projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f976b99
)
[AArch64] Add regression test for missed bfi optimization.
author
Eli Friedman
<efriedma@quicinc.com>
Thu, 3 Jun 2021 00:23:58 +0000
(17:23 -0700)
committer
Eli Friedman
<efriedma@quicinc.com>
Thu, 3 Jun 2021 00:38:51 +0000
(17:38 -0700)
(See https://reviews.llvm.org/D60358 for the transform that breaks this
case.)
llvm/test/CodeGen/AArch64/bitfield-insert.ll
patch
|
blob
|
history
diff --git
a/llvm/test/CodeGen/AArch64/bitfield-insert.ll
b/llvm/test/CodeGen/AArch64/bitfield-insert.ll
index
3015844
..
37e3a34
100644
(file)
--- a/
llvm/test/CodeGen/AArch64/bitfield-insert.ll
+++ b/
llvm/test/CodeGen/AArch64/bitfield-insert.ll
@@
-576,3
+576,18
@@
define <2 x i32> @test_complex_type(<2 x i32>* %addr, i64 %in, i64* %bf ) {
ret <2 x i32> %vec
}
+
+define i64 @test_truncated_shift(i64 %x, i64 %y) {
+; CHECK-LABEL: test_truncated_shift:
+; CHECK: // %bb.0: // %entry
+; CHECK-NEXT: lsl w8, w1, #25
+; CHECK-NEXT: lsr x8, x8, #25
+; CHECK-NEXT: bfi x0, x8, #25, #5
+; CHECK-NEXT: ret
+entry:
+ %and = and i64 %x, -1040187393
+ %shl4 = shl i64 %y, 25
+ %and5 = and i64 %shl4, 1040187392
+ %or = or i64 %and5, %and
+ ret i64 %or
+}