summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2014-04-22 03:49:30 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2014-04-22 03:49:30 +0000
commit5dbd5db51881830c34569dfa583f7d3c2fe341ab (patch)
tree24297fda3866d2a12a2bc80763a70eebd71cb92f /llvm/test
parent87486e0bac1c0f547741cf91a391ef35eac4578a (diff)
downloadbcm5719-llvm-5dbd5db51881830c34569dfa583f7d3c2fe341ab.tar.gz
bcm5719-llvm-5dbd5db51881830c34569dfa583f7d3c2fe341ab.zip
R600: Make sign_extend_inreg legal.
Don't know why I didn't just do this in the first place. llvm-svn: 206862
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/CodeGen/R600/sext-in-reg.ll13
1 files changed, 13 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/R600/sext-in-reg.ll b/llvm/test/CodeGen/R600/sext-in-reg.ll
index b722959aad5..6ba7011b59a 100644
--- a/llvm/test/CodeGen/R600/sext-in-reg.ll
+++ b/llvm/test/CodeGen/R600/sext-in-reg.ll
@@ -74,6 +74,19 @@ define void @sext_in_reg_i8_to_v1i32(<1 x i32> addrspace(1)* %out, <1 x i32> %a,
ret void
}
+; FUNC-LABEL: @sext_in_reg_i1_to_i64
+; SI: S_ADD_I32 [[VAL:s[0-9]+]],
+; SI: S_BFE_I32 s{{[0-9]+}}, s{{[0-9]+}}, 0x10000
+; SI: S_MOV_B32 {{s[0-9]+}}, -1
+; SI: BUFFER_STORE_DWORDX2
+define void @sext_in_reg_i1_to_i64(i64 addrspace(1)* %out, i64 %a, i64 %b) nounwind {
+ %c = add i64 %a, %b
+ %shl = shl i64 %c, 63
+ %ashr = ashr i64 %shl, 63
+ store i64 %ashr, i64 addrspace(1)* %out, align 8
+ ret void
+}
+
; FUNC-LABEL: @sext_in_reg_i8_to_i64
; SI: S_ADD_I32 [[VAL:s[0-9]+]],
; SI: S_SEXT_I32_I8 [[EXTRACT:s[0-9]+]], [[VAL]]
OpenPOWER on IntegriCloud