summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2013-10-10 18:04:16 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2013-10-10 18:04:16 +0000
commit1cc41bf63c7ed5c789932cd9e202a2182cbf00e9 (patch)
tree105d0327fff434951d43da77533a0f0a5576e530 /lib
parenta7d9a5d64a89ef8532fcf38cc8a57960d48e283e (diff)
downloadllvm-1cc41bf63c7ed5c789932cd9e202a2182cbf00e9.tar.gz
llvm-1cc41bf63c7ed5c789932cd9e202a2182cbf00e9.tar.bz2
llvm-1cc41bf63c7ed5c789932cd9e202a2182cbf00e9.tar.xz
R600: Fix trunc i64 to i32 on SI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192375 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/R600/SIInstructions.td5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Target/R600/SIInstructions.td b/lib/Target/R600/SIInstructions.td
index d9cf1e5c57..c0db7f9c2b 100644
--- a/lib/Target/R600/SIInstructions.td
+++ b/lib/Target/R600/SIInstructions.td
@@ -851,6 +851,11 @@ def : Pat <
(V_CNDMASK_B32_e64 $src0, $src1, $src2)
>;
+def : Pat <
+ (i32 (trunc i64:$val)),
+ (EXTRACT_SUBREG $val, sub0)
+>;
+
//use two V_CNDMASK_B32_e64 instructions for f64
def : Pat <
(f64 (select i1:$src2, f64:$src1, f64:$src0)),