summaryrefslogtreecommitdiff
path: root/test/CodeGen
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2014-04-25 10:48:47 +0000
committerTim Northover <tnorthover@apple.com>2014-04-25 10:48:47 +0000
commit5c4d1570ca77e5b85ba4c55c3a9c9346143cb4ac (patch)
tree9a20f4114babb38d6463ef28a99e69f3e920480e /test/CodeGen
parent8aa927abb5588b777d24e9bc9488d91ca7a6860d (diff)
downloadllvm-5c4d1570ca77e5b85ba4c55c3a9c9346143cb4ac.tar.gz
llvm-5c4d1570ca77e5b85ba4c55c3a9c9346143cb4ac.tar.bz2
llvm-5c4d1570ca77e5b85ba4c55c3a9c9346143cb4ac.tar.xz
ARM64: fix assertion in ISelDAGToDAG
Also an unused variable, so double bonus! This should deal with PR19548. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207221 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen')
-rw-r--r--test/CodeGen/ARM64/bitfield-extract.ll17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/CodeGen/ARM64/bitfield-extract.ll b/test/CodeGen/ARM64/bitfield-extract.ll
index c33e57e178..143aebc577 100644
--- a/test/CodeGen/ARM64/bitfield-extract.ll
+++ b/test/CodeGen/ARM64/bitfield-extract.ll
@@ -500,3 +500,20 @@ end:
%conv3 = phi i80 [%conv, %entry], [%conv2, %then]
ret i80 %conv3
}
+
+define i16 @test_ignored_rightbits(i32 %dst, i32 %in) {
+; CHECK-LABEL: test_ignored_rightbits:
+
+ %positioned_field = shl i32 %in, 3
+ %positioned_masked_field = and i32 %positioned_field, 120
+ %masked_dst = and i32 %dst, 7
+ %insertion = or i32 %masked_dst, %positioned_masked_field
+; CHECK: {{bfm|bfi}}
+
+ %shl16 = shl i32 %insertion, 8
+ %or18 = or i32 %shl16, %insertion
+ %conv19 = trunc i32 %or18 to i16
+; CHECK: {{bfm w[0-9]+, w[0-9]+, #24, #6|bfi w[0-9]+, w[0-9]+, #8, #7}}
+
+ ret i16 %conv19
+}