1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00
llvm-mirror/lib/Transforms
Nikita Popov 6745ba46ae Fix incorrect SimplifyWithOpReplaced transform (PR47322)
This is a followup to D86834, which partially fixed this issue in
InstSimplify. However, InstCombine repeats the same transform while
dropping poison flags -- which does not cover cases where poison is
introduced in some other way.

The fix here is a bit more comprehensive, because things are quite
entangled, and it's hard to only partially address it without
regressing optimization. There are really two changes here:

 * Export the SimplifyWithOpReplaced API from InstSimplify, with an
   added AllowRefinement flag. For replacements inside the TrueVal
   we don't actually care whether refinement occurs or not, the
   replacement is always legal. This part of the transform is now
   done in InstSimplify only. (It should be noted that the current
   AllowRefinement check is not sufficient -- that's an issue we
   need to address separately.)
 * Change the InstCombine fold to work by temporarily dropping
   poison generating flags, running the fold and then restoring the
   flags if it didn't work out. This will ensure that the InstCombine
   fold is correct as long as the InstSimplify fold is correct.

Differential Revision: https://reviews.llvm.org/D87445
2020-09-15 10:21:08 +02:00
..
AggressiveInstCombine AggressiveInstCombineInternal.h - reduce unnecessary includes to forward declarations. NFC. 2020-06-26 09:58:20 +01:00
CFGuard [NFCI][IR] Introduce CallBase::Create() wrapper 2020-07-07 01:16:36 +03:00
Coroutines [Coroutines] Refactor sinkLifetimeStartMarkers 2020-07-09 18:23:28 +08:00
Hello
InstCombine Fix incorrect SimplifyWithOpReplaced transform (PR47322) 2020-09-15 10:21:08 +02:00
Instrumentation [MSAN] Implement experimental vector reduction intrinsics 2020-07-14 00:12:10 +00:00
IPO [globalopt] Change so that emitting fragments doesn't use the type size of DIVariables 2020-08-19 18:36:13 +02:00
ObjCARC ObjCARC.h - remove unnecessary includes. NFC. 2020-06-24 12:30:59 +01:00
Scalar [JumpThreading] ProcessBranchOnXOR(): bailout if any pred ends in indirect branch (PR46857) 2020-07-27 16:31:31 +02:00
Utils [NFC] Add debug and stat counters to assume queries and assume builder 2020-07-14 21:49:14 +02:00
Vectorize [SVE] Don't consider scalable vector types in SLPVectorizerPass::vectorizeChainsInBlock 2020-07-31 17:27:50 +02:00
CMakeLists.txt
LLVMBuild.txt