]> granicus.if.org Git - llvm/commit
[AMDGPU] Simplify setcc (sext from i1 b), -1|0, cc
authorStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>
Tue, 27 Jun 2017 18:53:03 +0000 (18:53 +0000)
committerStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>
Tue, 27 Jun 2017 18:53:03 +0000 (18:53 +0000)
commite764e24028a175bcb4948c70f1c54b91ae84a2d0
tree7092cab912981cd482a8ef49c408b338019def07
parentecf693d5352185dd4c02df3d8cdb6e125707232a
[AMDGPU] Simplify setcc (sext from i1 b), -1|0, cc

Depending on the compare code that can be either an argument of
sext or negate of it. This helps to avoid v_cndmask_b64 instruction
for sext. A reversed value can be further simplified and folded into
its parent comparison if possible.

Differential Revision: https://reviews.llvm.org/D34545

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306446 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AMDGPU/SIISelLowering.cpp
test/CodeGen/AMDGPU/setcc-sext.ll [new file with mode: 0644]