summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorTom Stellard <thomas.stellard@amd.com>2016-11-15 21:25:56 +0000
committerTom Stellard <thomas.stellard@amd.com>2016-11-15 21:25:56 +0000
commitd23de360dbbae33a5d6ba1519fe3156fa6f4cd85 (patch)
tree6a8851805aa7f1495d533f10fa7a4a49e652741b /llvm/lib/Target
parentc3dcf99441322c37eb3a7a013b92554622beb7a6 (diff)
downloadbcm5719-llvm-d23de360dbbae33a5d6ba1519fe3156fa6f4cd85.tar.gz
bcm5719-llvm-d23de360dbbae33a5d6ba1519fe3156fa6f4cd85.zip
AMDGPU/SI: Fix pattern for i16 = sign_extend i1
Reviewers: arsenm Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, llvm-commits, tony-tye Differential Revision: https://reviews.llvm.org/D26670 llvm-svn: 287035
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/AMDGPU/VOP2Instructions.td6
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/Target/AMDGPU/VOP2Instructions.td b/llvm/lib/Target/AMDGPU/VOP2Instructions.td
index 8e86aa0796e..b87f3be2139 100644
--- a/llvm/lib/Target/AMDGPU/VOP2Instructions.td
+++ b/llvm/lib/Target/AMDGPU/VOP2Instructions.td
@@ -433,9 +433,13 @@ defm : Bits_OpsRev_i16_Pats<srl, V_LSHRREV_B16_e32>;
defm : Bits_OpsRev_i16_Pats<sra, V_ASHRREV_B16_e32>;
def : ZExt_i16_i1_Pat<zext>;
-def : ZExt_i16_i1_Pat<sext>;
def : ZExt_i16_i1_Pat<anyext>;
+def : Pat <
+ (i16 (sext i1:$src)),
+ (V_CNDMASK_B32_e64 (i32 0), (i32 -1), $src)
+>;
+
} // End Predicates = [isVI]
//===----------------------------------------------------------------------===//
OpenPOWER on IntegriCloud