author | Hal Finkel <hfinkel@anl.gov> | |
Sat, 10 Jan 2015 08:21:59 +0000 (08:21 +0000) | ||
committer | Hal Finkel <hfinkel@anl.gov> | |
Sat, 10 Jan 2015 08:21:59 +0000 (08:21 +0000) | ||
commit | 9ae5b7a40a2162ba6db5674798e4a4b65f690aed | |
tree | c89ec818a74f0406a91c3e436085b4cb0c0c3a8a | tree | snapshot (tar.xz tar.gz zip) |
parent | 8ab13c61ed74c91b7b8355afb4d6347a2f149090 | commit | diff |
[PowerPC] Mark zext of a small scalar load as free
This initial implementation of PPCTargetLowering::isZExtFree marks as free
zexts of small scalar loads (that are not sign-extending). This callback is
used by SelectionDAGBuilder's RegsForValue::getCopyToRegs, and thus to
determine whether a zext or an anyext is used to lower illegally-typed PHIs.
Because later truncates of zero-extended values are nops, this allows for the
elimination of later unnecessary truncations.
Fixes the initial complaint associated with PR22120.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225584 91177308-0d34-0410-b5e6-96231b3b80d8
This initial implementation of PPCTargetLowering::isZExtFree marks as free
zexts of small scalar loads (that are not sign-extending). This callback is
used by SelectionDAGBuilder's RegsForValue::getCopyToRegs, and thus to
determine whether a zext or an anyext is used to lower illegally-typed PHIs.
Because later truncates of zero-extended values are nops, this allows for the
elimination of later unnecessary truncations.
Fixes the initial complaint associated with PR22120.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225584 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/PowerPC/PPCISelLowering.cpp | diff | blob | history | |
lib/Target/PowerPC/PPCISelLowering.h | diff | blob | history | |
test/CodeGen/PowerPC/zext-free.ll | [new file with mode: 0644] | blob |