summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTom Stellard <thomas.stellard@amd.com>2014-05-16 20:56:41 +0000
committerTom Stellard <thomas.stellard@amd.com>2014-05-16 20:56:41 +0000
commit3bd63cd65541762d42eaf6bb5c0b46d97c7d39c3 (patch)
tree8abfb1b744f2ad240977cadb53531009a3e23bef /lib
parent03b96200c63d37f434dae3a85eee8944eaecf91b (diff)
downloadllvm-3bd63cd65541762d42eaf6bb5c0b46d97c7d39c3.tar.gz
llvm-3bd63cd65541762d42eaf6bb5c0b46d97c7d39c3.tar.bz2
llvm-3bd63cd65541762d42eaf6bb5c0b46d97c7d39c3.tar.xz
R600/SI: Promote f32 SELECT to i32
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209024 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/R600/SIISelLowering.cpp2
-rw-r--r--lib/Target/R600/SIInstructions.td6
2 files changed, 2 insertions, 6 deletions
diff --git a/lib/Target/R600/SIISelLowering.cpp b/lib/Target/R600/SIISelLowering.cpp
index 7c0a6dd9f4..b51c46c59e 100644
--- a/lib/Target/R600/SIISelLowering.cpp
+++ b/lib/Target/R600/SIISelLowering.cpp
@@ -99,6 +99,8 @@ SITargetLowering::SITargetLowering(TargetMachine &TM) :
setOperationAction(ISD::STORE, MVT::v2i32, Custom);
setOperationAction(ISD::STORE, MVT::v4i32, Custom);
+ setOperationAction(ISD::SELECT, MVT::f32, Promote);
+ AddPromotedToType(ISD::SELECT, MVT::f32, MVT::i32);
setOperationAction(ISD::SELECT, MVT::i64, Custom);
setOperationAction(ISD::SELECT, MVT::f64, Promote);
AddPromotedToType(ISD::SELECT, MVT::f64, MVT::i64);
diff --git a/lib/Target/R600/SIInstructions.td b/lib/Target/R600/SIInstructions.td
index fab74d064f..482295c26e 100644
--- a/lib/Target/R600/SIInstructions.td
+++ b/lib/Target/R600/SIInstructions.td
@@ -1121,12 +1121,6 @@ def V_CNDMASK_B32_e64 : VOP3 <0x00000100, (outs VReg_32:$dst),
let src2_modifiers = 0;
}
-//f32 pattern for V_CNDMASK_B32_e64
-def : Pat <
- (f32 (select i1:$src2, f32:$src1, f32:$src0)),
- (V_CNDMASK_B32_e64 $src0, $src1, $src2)
->;
-
def V_READLANE_B32 : VOP2 <
0x00000001,
(outs SReg_32:$vdst),