llvm-project/llvm/lib/Transforms/InstCombine
Roman Lebedev 98cb1216a6 [InstCombine] foldICmpWithLowBitMaskedVal(): don't miscompile -1 vector elts
I was finally able to quantify what i thought was missing in the fix,
it was vector constants. If we have a scalar (and %x, -1),
it will be instsimplified before we reach this code,
but if it is a vector, we may still have a -1 element.

Thus, we want to avoid the fold if *at least one* element is -1.
Or in other words, ignoring the undef elements, no sign bits
should be set. Thus, m_NonNegative().

A follow-up for rL348181
https://bugs.llvm.org/show_bug.cgi?id=39861

llvm-svn: 348462
2018-12-06 08:14:24 +00:00
..
CMakeLists.txt InstCombine/AMDGPU: Add dimension-aware image intrinsics to SimplifyDemanded 2018-06-21 13:37:31 +00:00
InstCombineAddSub.cpp [InstCombine] name change: foldShuffledBinop -> foldVectorBinop; NFC 2018-10-03 15:20:58 +00:00
InstCombineAndOrXor.cpp [CmpInstAnalysis] fix function signature for ICmp code to predicate; NFC 2018-12-04 18:53:27 +00:00
InstCombineCalls.cpp [InstCombine] Support ssub.sat canonicalization for non-splats 2018-12-01 10:58:34 +00:00
InstCombineCasts.cpp [InstCombine] fix rotate narrowing bug for non-pow-2 types 2018-11-15 17:19:14 +00:00
InstCombineCompares.cpp [InstCombine] foldICmpWithLowBitMaskedVal(): don't miscompile -1 vector elts 2018-12-06 08:14:24 +00:00
InstCombineInternal.h [InstCombine] add helper for icmp with dominator; NFC 2018-12-04 15:35:17 +00:00
InstCombineLoadStoreAlloca.cpp [InstCombine] Set debug loc on `mergeStoreIntoSuccessor` phi 2018-11-19 19:55:02 +00:00
InstCombineMulDivRem.cpp Add a emitUnaryFloatFnCall version that fetches the function name from TLI 2018-10-18 06:27:53 +00:00
InstCombinePHI.cpp Use llvm::{all,any,none}_of instead std::{all,any,none}_of. NFC 2018-10-19 06:12:02 +00:00
InstCombineSelect.cpp [InstSimplify] fold select with implied condition 2018-11-29 18:44:39 +00:00
InstCombineShifts.cpp [InstCombine] Ensure nested shifts are in range (OSS-Fuzz #9880) 2018-11-06 11:28:22 +00:00
InstCombineSimplifyDemanded.cpp Revert r347871 "Fix: Add support for TFE/LWE in image intrinsic" 2018-11-29 20:14:17 +00:00
InstCombineTables.td InstCombine/AMDGPU: Add dimension-aware image intrinsics to SimplifyDemanded 2018-06-21 13:37:31 +00:00
InstCombineVectorOps.cpp [InstCombine] remove dead code from visitExtractElement 2018-12-05 23:09:33 +00:00
InstructionCombining.cpp [InstCombine] fix undef propagation bug with shuffle+binop 2018-12-03 21:15:17 +00:00
LLVMBuild.txt