1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00
llvm-mirror/lib/Transforms
Sanjay Patel 1321d2af68 [InstCombine] fold shuffle-with-binop and common value
This is the last significant change suggested in PR37806:
https://bugs.llvm.org/show_bug.cgi?id=37806#c5
...though there are several follow-ups noted in the code comments 
in this patch to complete this transform.

It's possible that a binop feeding a select-shuffle has been eliminated 
by earlier transforms (or the code was just written like this in the 1st 
place), so we'll fail to match the patterns that have 2 binops from: 
D48401, 
D48678, 
D48662, 
D48485.

In that case, we can try to materialize identity constants for the remaining
binop to fill in the "ghost" lanes of the vector (where we just want to pass 
through the original values of the source operand).

I added comments to ConstantExpr::getBinOpIdentity() to show planned follow-ups. 
For now, we only handle the 5 commutative integer binops (add/mul/and/or/xor).

Differential Revision: https://reviews.llvm.org/D48830

llvm-svn: 336196
2018-07-03 13:44:22 +00:00
..
AggressiveInstCombine Move Analysis/Utils/Local.h back to Transforms 2018-06-04 21:23:21 +00:00
Coroutines Move Analysis/Utils/Local.h back to Transforms 2018-06-04 21:23:21 +00:00
Hello
InstCombine [InstCombine] fold shuffle-with-binop and common value 2018-07-03 13:44:22 +00:00
Instrumentation [HWASan] Do not retag allocas before return from the function. 2018-06-29 20:20:17 +00:00
IPO [UnrollAndJam] New Unroll and Jam pass 2018-07-01 12:47:30 +00:00
ObjCARC ProvenanceAnalysis: Store WeakTrackingVH instead of Value* in UnderlyingValue Cache. 2018-06-21 05:14:00 +00:00
Scalar [PM/LoopUnswitch] Fix PR37651 by correctly invalidating SCEV when 2018-07-03 09:13:27 +00:00
Utils [DebugInfo] Corrections for salvageDebugInfo 2018-07-03 11:29:00 +00:00
Vectorize [SLP] Recognize min/max pattern using instructions producing same values. 2018-07-02 17:55:31 +00:00
CMakeLists.txt
LLVMBuild.txt