1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2; RUN: llc < %s -mtriple=aarch64-unknown-unknown | FileCheck %s
3
4define i64 @sub1_disguised_constant(i64 %x) {
5; CHECK-LABEL: sub1_disguised_constant:
6; CHECK:       // %bb.0:
7; CHECK-NEXT:    sub w8, w0, #1 // =1
8; CHECK-NEXT:    and w8, w0, w8
9; CHECK-NEXT:    and x0, x8, #0xffff
10; CHECK-NEXT:    ret
11  %a1 = and i64 %x, 65535
12  %a2 = add i64 %x, 65535
13  %r = and i64 %a1, %a2
14  ret i64 %r
15}
16
17