1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00
llvm-mirror/lib/Transforms
Hans Wennborg 78cd25d7f9 Revert 5238e7b302 "[InstCombine] Replace one-use select operand based on condition"
This caused a miscompile in Chromium, see comments on the codereview for
discussion and pointer to a reproducer.

> InstCombine already performs a fold where X == Y ? f(X) : Z is
> transformed to X == Y ? f(Y) : Z if f(Y) simplifies. However,
> if f(X) only has one use, then we can always directly replace the
> use inside the instruction. To actually be profitable, limit it to
> the case where Y is a non-expr constant.
>
> This could be further extended to replace uses further up a one-use
> instruction chain, but for now this only looks one level up.
>
> Among other things, this also subsumes D94860.
>
> Differential Revision: https://reviews.llvm.org/D94862

This also reverts the follow-up
a003f26539cf4db744655e76c41f4c4a8913f116:

> [llvm] Prevent infinite loop in InstCombine of select statements
>
> This fixes an issue where the RHS and LHS the comparison operation
> creating the predicate were swapped back and forth forever.
>
> Differential Revision: https://reviews.llvm.org/D94934
2021-01-19 11:50:56 +01:00
..
AggressiveInstCombine [AggressiveInstCombine] Generalize foldGuardedRotateToFunnelShift to generic funnel shifts (REAPPLIED) 2020-12-21 15:22:27 +00:00
CFGuard
Coroutines [Coroutine] Do not CoroElide if there are musttail calls 2021-01-18 09:06:21 -08:00
Hello
HelloNew
InstCombine Revert 5238e7b302 "[InstCombine] Replace one-use select operand based on condition" 2021-01-19 11:50:56 +01:00
Instrumentation [SimplifyCFG] Port SplitBlockAndInsertIfThen() to DomTreeUpdater 2021-01-15 23:35:56 +03:00
IPO [LoopRotate] Add PrepareForLTO stage, avoid rotating with inline cands. 2021-01-19 10:15:29 +00:00
ObjCARC [NewPM] Run ObjC ARC passes 2021-01-08 15:47:11 -08:00
Scalar [LoopRotate] Add PrepareForLTO stage, avoid rotating with inline cands. 2021-01-19 10:15:29 +00:00
Utils [LoopRotate] Add PrepareForLTO stage, avoid rotating with inline cands. 2021-01-19 10:15:29 +00:00
Vectorize [NFC] Make remaining cost functions in LoopVectorize.cpp use InstructionCost 2021-01-19 09:08:40 +00:00
CMakeLists.txt