summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC/PPCBoolRetToInt.cpp
diff options
context:
space:
mode:
authorTom Stellard <thomas.stellard@amd.com>2016-01-18 19:55:21 +0000
committerTom Stellard <thomas.stellard@amd.com>2016-01-18 19:55:21 +0000
commitccdc5391eaa6ae811dbbf3b7291a736954c616f1 (patch)
treeae31e5ba2616e2b246cb50c6e0e557fc996b5111 /llvm/lib/Target/PowerPC/PPCBoolRetToInt.cpp
parent2576124eb57660db40a65806d4acf352e872d678 (diff)
downloadbcm5719-llvm-ccdc5391eaa6ae811dbbf3b7291a736954c616f1.tar.gz
bcm5719-llvm-ccdc5391eaa6ae811dbbf3b7291a736954c616f1.zip
TargetLowering: Improve handling of (setcc ([sz]ext x) 0, cc) in SimplifySetCC
Summary: When SimplifySetCC sees a setcc node that compares the result of a value extension operation with a constant, it tries to simplify the setcc node by eliminating the extension and shrinking the constant. If shrinking the inputs to setcc is deemed not desirable by the target (e.g. the target does not want a setcc comparing i1 values), then it is still possible to optimize this sequence in some cases. This patch adds the following combines to SimplifySetCC when shrinking setcc inputs is not desirable: (setcc ([sz]ext (setcc x, y, cc)), 0, setne) -> (setcc (x, y, cc)) (setcc ([sz]ext (setcc x, y, cc)), 0, seteq) -> (setcc (x, Y, !cc)) There are no tests for this yet, but once AMDGPU correctly implements TargetLowering::isTypeDesirableForOp(), this new combine will be exercised by the existing CodeGen/AMDGPU/setcc-opt.ll test. Reviewers: resistor, arsenm Subscribers: jroelofs, arsenm, llvm-commits Differential Revision: http://reviews.llvm.org/D15034 llvm-svn: 258067
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCBoolRetToInt.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud