summaryrefslogtreecommitdiff
path: root/lib/Transforms/Utils/CodeExtractor.cpp
diff options
context:
space:
mode:
authorHal Finkel <hfinkel@anl.gov>2014-03-01 21:36:57 +0000
committerHal Finkel <hfinkel@anl.gov>2014-03-01 21:36:57 +0000
commit92b38a9d1c2c8dcd1055de5dc1458ec24baee4da (patch)
tree523ad5f4b6346ea1dbd9166bc341b8f4b13b8f8e /lib/Transforms/Utils/CodeExtractor.cpp
parente4c88dd9095a566f934b826b7b94a0a8943959bc (diff)
downloadllvm-92b38a9d1c2c8dcd1055de5dc1458ec24baee4da.tar.gz
llvm-92b38a9d1c2c8dcd1055de5dc1458ec24baee4da.tar.bz2
llvm-92b38a9d1c2c8dcd1055de5dc1458ec24baee4da.tar.xz
Remove extra truncs/exts around i32 bit operations on PPC64
This generalizes the code to eliminate extra truncs/exts around i1 bit operations to also do the same on PPC64 for i32 bit operations. This eliminates a fairly prevalent code wart: int foo(int a) { return a == 5 ? 7 : 8; } On PPC64, because of the extension implied by the ABI, this would generate: cmplwi 0, 3, 5 li 12, 8 li 4, 7 isel 3, 4, 12, 2 rldicl 3, 3, 0, 32 blr where the 'rldicl 3, 3, 0, 32', the extension, is completely unnecessary. At least for the single-BB case (which is all that the DAG combine mechanism can handle), this unnecessary extension is no longer generated. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202600 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/CodeExtractor.cpp')
0 files changed, 0 insertions, 0 deletions