• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc -verify-machineinstrs -o - %s -mtriple=arm64-apple-ios7.0 | FileCheck %s
2
3@var32 = global i32 0
4@var64 = global i64 0
5
6define void @test_and(i32 %in32, i64 %in64) {
7; CHECK-LABEL: test_and:
8
9  %val0 = and i32 %in32, 2863311530
10  store volatile i32 %val0, i32* @var32
11; CHECK: and {{w[0-9]+}}, {{w[0-9]+}}, #0xaaaaaaaa
12
13  %val1 = and i32 %in32, 4293984240
14  store volatile i32 %val1, i32* @var32
15; CHECK: and {{w[0-9]+}}, {{w[0-9]+}}, #0xfff0fff0
16
17  %val2 = and i64 %in64, 9331882296111890817
18  store volatile i64 %val2, i64* @var64
19; CHECK: and {{x[0-9]+}}, {{x[0-9]+}}, #0x8181818181818181
20
21  %val3 = and i64 %in64, 18429855317404942275
22  store volatile i64 %val3, i64* @var64
23; CHECK: and {{x[0-9]+}}, {{x[0-9]+}}, #0xffc3ffc3ffc3ffc3
24
25  ret void
26}
27
28define void @test_orr(i32 %in32, i64 %in64) {
29; CHECK-LABEL: test_orr:
30
31  %val0 = or i32 %in32, 2863311530
32  store volatile i32 %val0, i32* @var32
33; CHECK: orr {{w[0-9]+}}, {{w[0-9]+}}, #0xaaaaaaaa
34
35  %val1 = or i32 %in32, 4293984240
36  store volatile i32 %val1, i32* @var32
37; CHECK: orr {{w[0-9]+}}, {{w[0-9]+}}, #0xfff0fff0
38
39  %val2 = or i64 %in64, 9331882296111890817
40  store volatile i64 %val2, i64* @var64
41; CHECK: orr {{x[0-9]+}}, {{x[0-9]+}}, #0x8181818181818181
42
43  %val3 = or i64 %in64, 18429855317404942275
44  store volatile i64 %val3, i64* @var64
45; CHECK: orr {{x[0-9]+}}, {{x[0-9]+}}, #0xffc3ffc3ffc3ffc3
46
47  ret void
48}
49
50define void @test_eor(i32 %in32, i64 %in64) {
51; CHECK-LABEL: test_eor:
52
53  %val0 = xor i32 %in32, 2863311530
54  store volatile i32 %val0, i32* @var32
55; CHECK: eor {{w[0-9]+}}, {{w[0-9]+}}, #0xaaaaaaaa
56
57  %val1 = xor i32 %in32, 4293984240
58  store volatile i32 %val1, i32* @var32
59; CHECK: eor {{w[0-9]+}}, {{w[0-9]+}}, #0xfff0fff0
60
61  %val2 = xor i64 %in64, 9331882296111890817
62  store volatile i64 %val2, i64* @var64
63; CHECK: eor {{x[0-9]+}}, {{x[0-9]+}}, #0x8181818181818181
64
65  %val3 = xor i64 %in64, 18429855317404942275
66  store volatile i64 %val3, i64* @var64
67; CHECK: eor {{x[0-9]+}}, {{x[0-9]+}}, #0xffc3ffc3ffc3ffc3
68
69  ret void
70}
71
72define void @test_mov(i32 %in32, i64 %in64) {
73; CHECK-LABEL: test_mov:
74  %val0 = add i32 %in32, 2863311530
75  store i32 %val0, i32* @var32
76; CHECK: orr {{w[0-9]+}}, wzr, #0xaaaaaaaa
77
78  %val1 = add i64 %in64, 11068046444225730969
79  store i64 %val1, i64* @var64
80; CHECK: orr {{x[0-9]+}}, xzr, #0x9999999999999999
81
82  ret void
83; CHECK: ret
84}
85