Skip to content
Snippets Groups Projects
Commit d8b9ed72 authored by Eli Friedman's avatar Eli Friedman
Browse files

[AArch64] Add regression test for missed bfi optimization.

(See https://reviews.llvm.org/D60358 for the transform that breaks this
case.)
parent f976b999
No related branches found
No related tags found
No related merge requests found
......@@ -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
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment