Repository navigation
Commit eaa3858
committed
x86: fix the NLT, NLE and GE predicates in simde_mm_cmp_sd and simde_mm_cmp_ss
Both LSX branches complemented the wrong comparison, the same way
simde_mm256_cmp_pd did: NLT used cult and NLE used cule, which are false for
unordered operands where the negated predicates have to be true, and GE used
clt, which is true for them where GE has to be false. Use clt and cle for
the negated predicates and cult for GE.
simde_mm_cmp_ss also selected its "always false" and "always true" cases with
SIMDE_LOONGARCH_LASX_NATIVE and wrote a_.i32[0] there, so those two cases went
through a different union member than every other case. When the function is
not inlined (SIMDE_CONSTRAINED_COMPILATION at -O1 and above) GCC then dropped
the upper lanes, leaving _mm_cmp_ss with imm8 11, 15, 27 or 31 with garbage
above the low element. Route them through a_.lsx_i64 like the rest.
Extend test_simde_mm_cmp_sd and test_simde_mm_cmp_ss with NaN inputs, which
are the only ones that tell the ordered and unordered predicates apart.1 parent e489066 commit eaa3858
2 files changed
Lines changed: 60 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2726 | 2726 | | |
2727 | 2727 | | |
2728 | 2728 | | |
2729 | | - | |
| 2729 | + | |
2730 | 2730 | | |
2731 | 2731 | | |
2732 | 2732 | | |
| |||
2736 | 2736 | | |
2737 | 2737 | | |
2738 | 2738 | | |
2739 | | - | |
| 2739 | + | |
2740 | 2740 | | |
2741 | 2741 | | |
2742 | 2742 | | |
| |||
2787 | 2787 | | |
2788 | 2788 | | |
2789 | 2789 | | |
2790 | | - | |
| 2790 | + | |
2791 | 2791 | | |
2792 | 2792 | | |
2793 | 2793 | | |
| |||
2891 | 2891 | | |
2892 | 2892 | | |
2893 | 2893 | | |
2894 | | - | |
| 2894 | + | |
2895 | 2895 | | |
2896 | 2896 | | |
2897 | 2897 | | |
| |||
2901 | 2901 | | |
2902 | 2902 | | |
2903 | 2903 | | |
2904 | | - | |
| 2904 | + | |
2905 | 2905 | | |
2906 | 2906 | | |
2907 | 2907 | | |
| |||
2946 | 2946 | | |
2947 | 2947 | | |
2948 | 2948 | | |
2949 | | - | |
2950 | | - | |
| 2949 | + | |
| 2950 | + | |
2951 | 2951 | | |
2952 | 2952 | | |
2953 | 2953 | | |
| |||
2956 | 2956 | | |
2957 | 2957 | | |
2958 | 2958 | | |
2959 | | - | |
| 2959 | + | |
2960 | 2960 | | |
2961 | 2961 | | |
2962 | 2962 | | |
| |||
2974 | 2974 | | |
2975 | 2975 | | |
2976 | 2976 | | |
2977 | | - | |
2978 | | - | |
| 2977 | + | |
| 2978 | + | |
2979 | 2979 | | |
2980 | 2980 | | |
2981 | 2981 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5843 | 5843 | | |
5844 | 5844 | | |
5845 | 5845 | | |
| 5846 | + | |
| 5847 | + | |
| 5848 | + | |
| 5849 | + | |
| 5850 | + | |
| 5851 | + | |
| 5852 | + | |
| 5853 | + | |
| 5854 | + | |
| 5855 | + | |
| 5856 | + | |
| 5857 | + | |
| 5858 | + | |
| 5859 | + | |
| 5860 | + | |
| 5861 | + | |
| 5862 | + | |
| 5863 | + | |
| 5864 | + | |
| 5865 | + | |
| 5866 | + | |
| 5867 | + | |
| 5868 | + | |
| 5869 | + | |
| 5870 | + | |
5846 | 5871 | | |
5847 | 5872 | | |
5848 | 5873 | | |
| |||
6042 | 6067 | | |
6043 | 6068 | | |
6044 | 6069 | | |
| 6070 | + | |
| 6071 | + | |
| 6072 | + | |
| 6073 | + | |
| 6074 | + | |
| 6075 | + | |
| 6076 | + | |
| 6077 | + | |
| 6078 | + | |
| 6079 | + | |
| 6080 | + | |
| 6081 | + | |
| 6082 | + | |
| 6083 | + | |
| 6084 | + | |
| 6085 | + | |
| 6086 | + | |
| 6087 | + | |
| 6088 | + | |
| 6089 | + | |
| 6090 | + | |
| 6091 | + | |
| 6092 | + | |
| 6093 | + | |
| 6094 | + | |
6045 | 6095 | | |
6046 | 6096 | | |
6047 | 6097 | | |
| |||
0 commit comments