Commit d00bc58
committed
[IVDescriptors] Don't require nsz/nnan for (min|max)num.
We do not need to require nsz or nnan for FP reductions with minnum and
maxnum. NaNs and nsz are handled consistently with the vector versions
of minnum and maxnum. vector.reduce.(fmin|fmax) also matches the
minnum/maxnum semantics for comparisons.
IIUC this was also the conclusion when support for minimum/maximum was
added (https://reviews.llvm.org/D151482?id=531021#inline-1481555).
Alive2 agrees that maxnum/minnum can be re-ordered (scalar version:
https://alive2.llvm.org/ce/z/GVmgBX) and also verifies the vectorized
code end-to-end, with a tweak to replace llvm.reduce.fmax with a scalar
maxnum, as Alive2 doesn't support llvm.reduce.fmax:
https://alive2.llvm.org/ce/z/EwJKeJ . Note that verification requires a
higher timeout than available in the online version.1 parent 237ed0c commit d00bc58
File tree
2 files changed
+10
-5
lines changed- llvm
- lib/Analysis
- test/Transforms/LoopVectorize
2 files changed
+10
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
892 | 892 | | |
893 | 893 | | |
894 | 894 | | |
895 | | - | |
896 | | - | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
897 | 898 | | |
898 | | - | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
899 | 902 | | |
900 | 903 | | |
901 | 904 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1002 | 1002 | | |
1003 | 1003 | | |
1004 | 1004 | | |
1005 | | - | |
| 1005 | + | |
| 1006 | + | |
1006 | 1007 | | |
1007 | 1008 | | |
1008 | 1009 | | |
| |||
1022 | 1023 | | |
1023 | 1024 | | |
1024 | 1025 | | |
1025 | | - | |
| 1026 | + | |
| 1027 | + | |
1026 | 1028 | | |
1027 | 1029 | | |
1028 | 1030 | | |
| |||
0 commit comments