1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 20:23:11 +01:00
llvm-mirror/lib/Transforms/InstCombine
Quentin Colombet 48ec8d3046 [InstCombiner] Expose opportunities to merge subtract and comparison.
Several architectures use the same instruction to perform both a comparison and
a subtract. The instruction selection framework does not allow to consider
different basic blocks to expose such fusion opportunities.

Therefore, these instructions are “merged” by CSE at MI IR level.

To increase the likelihood of CSE to apply in such situation, we reorder the
operands of the comparison, when they have the same complexity, so that they
matches the order of the most frequent subtract.
E.g.,

icmp A, B
...
sub B, A

<rdar://problem/14514580>

llvm-svn: 190352
2013-09-09 20:56:48 +00:00
..
CMakeLists.txt Tidy up a bit. No functional change. 2013-04-05 21:20:12 +00:00
InstCombine.h Consistently use dbgs() in debug printing 2013-09-05 19:48:28 +00:00
InstCombineAddSub.cpp Preserve fast-math flags when folding (fsub x, (fneg y)) to (fadd x, y). 2013-07-30 23:53:17 +00:00
InstCombineAndOrXor.cpp InstCombine: allow unmasked icmps to be combined with logical ops 2013-09-04 11:57:17 +00:00
InstCombineCalls.cpp Change behavior of calling bitcasted alias functions. 2013-07-30 20:45:05 +00:00
InstCombineCasts.cpp Teach InstCombine about address spaces 2013-08-21 19:53:10 +00:00
InstCombineCompares.cpp [InstCombiner] Expose opportunities to merge subtract and comparison. 2013-09-09 20:56:48 +00:00
InstCombineLoadStoreAlloca.cpp Teach InstCombineLoadCast about address spaces. 2013-09-03 21:05:48 +00:00
InstCombineMulDivRem.cpp Correct case of m_UIToFp to m_UIToFP to match instruction name, add m_SIToFP for consistency. 2013-07-26 17:55:00 +00:00
InstCombinePHI.cpp Consistently use dbgs() in debug printing 2013-09-05 19:48:28 +00:00
InstCombineSelect.cpp InstCombine: Also turn selects fed by an and into arithmetic when the types don't match. 2013-06-29 21:17:04 +00:00
InstCombineShifts.cpp Revert r174152. The shift amount may overflow and in that case this transformation is illegal. 2013-02-01 07:59:33 +00:00
InstCombineSimplifyDemanded.cpp InstCombine: Check for zero shift amounts before subtracting one causing integer overflow. 2013-08-30 14:35:35 +00:00
InstCombineVectorOps.cpp Use type helper functions. 2013-09-06 00:37:24 +00:00
InstCombineWorklist.h Consistently use dbgs() in debug printing 2013-09-05 19:48:28 +00:00
InstructionCombining.cpp Consistently use dbgs() in debug printing 2013-09-05 19:48:28 +00:00
LLVMBuild.txt
Makefile