aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineModuleInfo.cpp
diff options
context:
space:
mode:
authorPhilip Reames <listmail@philipreames.com>2015-02-14 00:05:36 +0000
committerPhilip Reames <listmail@philipreames.com>2015-02-14 00:05:36 +0000
commit9ae15209ad2d987318e55bf53a397d5afe447f1f (patch)
treeb06aea172184013ed8c754dc55b5e652b73d575e /llvm/lib/CodeGen/MachineModuleInfo.cpp
parentec87a50a3e9175441b5e4b38cc477881c078edf8 (diff)
downloadllvm-9ae15209ad2d987318e55bf53a397d5afe447f1f.zip
llvm-9ae15209ad2d987318e55bf53a397d5afe447f1f.tar.gz
llvm-9ae15209ad2d987318e55bf53a397d5afe447f1f.tar.bz2
[InstCombine] When canonicalizing gep indices, prefer zext when possible
If we know that the sign bit of a value being sign extended is zero, we can use a zero extension instead. This is motivated by the fact that zero extensions are generally cheaper on x86 (and most other architectures?). We already apply a similar transform in DAGCombine, this just extends that to the IR level. This comes up when we eagerly canonicalize gep indices to the width of a machine register (i64 on x86_64). To do so, we insert sign extensions (sext) to promote smaller types. Differential Revision: http://reviews.llvm.org/D7255 llvm-svn: 229189
Diffstat (limited to 'llvm/lib/CodeGen/MachineModuleInfo.cpp')
0 files changed, 0 insertions, 0 deletions