llvm-project/llvm/test/Transforms/CorrelatedValuePropagation
Roman Lebedev 9829f5e6b1
[CVP] @llvm.[us]{min,max}() intrinsics handling
If we can tell that either one of the arguments is taken,
bypass the intrinsic.

Notably, we are indeed fine with non-strict predicate:
* UL: https://alive2.llvm.org/ce/z/69qVW9 https://alive2.llvm.org/ce/z/kNFTKf
      https://alive2.llvm.org/ce/z/AvaPw2 https://alive2.llvm.org/ce/z/oxo53i
* UG: https://alive2.llvm.org/ce/z/wxHeGH https://alive2.llvm.org/ce/z/Lf76qx
* SL: https://alive2.llvm.org/ce/z/hkeTGS https://alive2.llvm.org/ce/z/eR_b-W
* SG: https://alive2.llvm.org/ce/z/wEqRm7 https://alive2.llvm.org/ce/z/FpAsVr

Much like with all other comparison handling in CVP,
while we could sort-of handle two Value's,
at least for plain ICmpInst it does not appear to be worthwhile.

This only fires 78 times on test-suite + dt + rs,
but we don't canonicalize to these yet. (only SCEV produces them)
2021-04-11 00:33:47 +03:00
..
2010-09-02-Trunc.ll
2010-09-26-MergeConstantRange.ll
abs.ll [CVP] @llvm.abs() handling 2021-04-10 16:47:31 +03:00
add.ll [CVP] Remove -cvp-dont-add-nowrap-flags option 2021-03-07 18:19:31 +01:00
alloca.ll
and.ll [CVP] Add more tests for select with overdefined operand (NFC) 2021-04-04 13:54:06 +02:00
ashr.ll
basic.ll [CVP] Add more tests for select with overdefined operand (NFC) 2021-04-04 13:54:06 +02:00
conflict.ll
crash.ll
deopt.ll [CVP] Allow two transforms in one invocation 2020-09-28 15:11:42 -07:00
guards.ll
icmp.ll [AC] Handle (X+C1)<C2 assumes (PR48408) 2020-12-13 21:00:32 +01:00
merge-range-and-undef.ll
min-max.ll [CVP] @llvm.[us]{min,max}() intrinsics handling 2021-04-11 00:33:47 +03:00
minmaxabs.ll [CVP] @llvm.abs() handling 2021-04-10 16:47:31 +03:00
mul.ll [CVP] Remove -cvp-dont-add-nowrap-flags option 2021-03-07 18:19:31 +01:00
non-null.ll Reapply [LVI] Normalize pointer behavior 2020-08-29 21:17:03 +02:00
overflow_predicate.ll [CVP] Remove unnecessary block splits in tests (NFC) 2020-09-27 20:55:28 +02:00
overflows.ll [CVP] Remove unnecessary block splits in tests (NFC) 2020-09-27 20:55:28 +02:00
phi-common-val.ll
pointer.ll
pr35807.ll
profmd.ll Revert "Use uint64_t for branch weights instead of uint32_t" 2020-10-31 00:25:32 -07:00
range.ll [LVI] Use range metadata on intrinsics 2021-04-02 16:45:31 +02:00
sdiv.ll [CVP] Pass context instruction when narrowing div/rem 2020-09-27 17:51:30 +02:00
select.ll [CVP] Remove unnecessary block splits in tests (NFC) 2020-09-27 20:55:28 +02:00
sext.ll
shl.ll [CVP] Remove -cvp-dont-add-nowrap-flags option 2021-03-07 18:19:31 +01:00
srem.ll [CVP] Remove unnecessary block splits in tests (NFC) 2020-09-27 20:55:28 +02:00
sub.ll [CVP] Remove -cvp-dont-add-nowrap-flags option 2021-03-07 18:19:31 +01:00
udiv.ll
urem.ll