1 ; RUN: llc < %s -mtriple=aarch64-none-linux-gnu | FileCheck %s
3 ; and can be eliminated
4 ; CHECK-LABEL: {{^}}test_call_known_max_range:
8 define i32 @test_call_known_max_range() #0 {
10 %id = tail call i32 @foo(), !range !0
11 %and = and i32 %id, 1023
15 ; CHECK-LABEL: {{^}}test_call_known_trunc_1_bit_range:
17 ; CHECK: and w{{[0-9]+}}, w0, #0x1ff
19 define i32 @test_call_known_trunc_1_bit_range() #0 {
21 %id = tail call i32 @foo(), !range !0
22 %and = and i32 %id, 511
26 ; CHECK-LABEL: {{^}}test_call_known_max_range_m1:
28 ; CHECK: and w{{[0-9]+}}, w0, #0xff
30 define i32 @test_call_known_max_range_m1() #0 {
32 %id = tail call i32 @foo(), !range !1
33 %and = and i32 %id, 255
40 attributes #0 = { norecurse nounwind }
41 attributes #1 = { nounwind readnone }
43 !0 = !{i32 0, i32 1024}
44 !1 = !{i32 0, i32 1023}