1; RUN: llc -mtriple arm64-ios- %s -o - | FileCheck %s
2
3; Check the -8 constant is shrunk if there are multiple users of the AND instruction.
4
5; CHECK-LABEL:  _test:
6; CHECK:          and x0, x0, #0xfffffff8
7; CHECK-NEXT:     add x19, x0, #10
8; CHECK-NEXT:     bl  _user
9
10define i64 @test(i32 %a) {
11  %ext = zext i32 %a to i64
12  %v1 = and i64 %ext, -8
13  %v2 = add i64 %v1, 10
14  call void @user(i64 %v1)
15  ret i64 %v2
16}
17
18declare void @user(i64)
19