]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - opencl/llvm.git/commit
[PowerPC] Mark zext of a small scalar load as free
authorHal Finkel <hfinkel@anl.gov>
Sat, 10 Jan 2015 08:21:59 +0000 (08:21 +0000)
committerHal Finkel <hfinkel@anl.gov>
Sat, 10 Jan 2015 08:21:59 +0000 (08:21 +0000)
commit9ae5b7a40a2162ba6db5674798e4a4b65f690aed
treec89ec818a74f0406a91c3e436085b4cb0c0c3a8a
parent8ab13c61ed74c91b7b8355afb4d6347a2f149090
[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
lib/Target/PowerPC/PPCISelLowering.cpp
lib/Target/PowerPC/PPCISelLowering.h
test/CodeGen/PowerPC/zext-free.ll [new file with mode: 0644]