1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00
llvm-mirror/lib/Transforms/InstCombine
Sanjay Patel 4345e14522 [InstCombine] avoid infinite loops from min/max canonicalization
The intrinsics have an extra chunk of known bits logic
compared to the normal cmp+select idiom. That allows
folding the icmp in each case to something better, but
that then opposes the canonical form of min/max that
we try to form for a select.

I'm carving out a narrow exception to preserve all
existing regression tests while avoiding the inf-loop.
It seems unlikely that this is the only bug like this
left, but this should fix:
https://llvm.org/PR51419

(cherry picked from commit b267d3ce8defa092600bda717ff18440d002f316)
2021-08-16 11:35:38 -07:00
..
CMakeLists.txt
InstCombineAddSub.cpp [InstCombine] fold reassociative FP add into start value of fadd reduction 2021-07-18 06:26:20 -04:00
InstCombineAndOrXor.cpp [InstCombine] InstCombinerImpl::visitOr - enable bitreverse matching 2021-05-15 13:39:09 +01:00
InstCombineAtomicRMW.cpp
InstCombineCalls.cpp [NFC][InstCombine] Fix typo 2021-07-27 11:33:10 +08:00
InstCombineCasts.cpp [InstCombine] Eliminate casts to optimize ctlz operation 2021-06-23 11:19:12 -04:00
InstCombineCompares.cpp [InstCombine] avoid infinite loops from min/max canonicalization 2021-08-16 11:35:38 -07:00
InstCombineInternal.h [InstCombine] Add freezeAllUsesOfArgument to visitFreeze 2021-07-24 18:08:58 +09:00
InstCombineLoadStoreAlloca.cpp Fixing an infinite loop problem in InstCombine 2021-08-04 16:51:40 -07:00
InstCombineMulDivRem.cpp [InstCombine] Fold (sext bool X) * (sext bool X) to zext (and X, X) 2021-06-18 16:28:06 +07:00
InstCombineNegator.cpp [Transforms] Use range-based for loops (NFC) 2021-02-08 22:33:53 -08:00
InstCombinePHI.cpp [InstCombine] Don't combine PHI before catchswitch 2021-07-02 12:10:24 -07:00
InstCombineSelect.cpp [InstCombine] Fixed select + masked load fold failure 2021-08-06 12:41:06 -07:00
InstCombineShifts.cpp [InstCombine] Fold lshr/ashr(or(neg(x),x),bw-1) --> zext/sext(icmp_ne(x,0)) (PR50816) 2021-07-13 14:44:54 +01:00
InstCombineSimplifyDemanded.cpp [InsCombine] Fix a few remaining vec transforms to use poison instead of undef 2021-05-31 18:47:09 +09:00
InstCombineVectorOps.cpp [NFC] Fix a few whitespace issues and typos. 2021-07-04 11:49:58 +01:00
InstructionCombining.cpp [LLVM IR] Allow volatile stores to trap. 2021-07-26 10:51:00 -07:00