1 ; RUN: llc -verify-machineinstrs -o - %s -mtriple=arm64-apple-ios7.0 | FileCheck %s
5 ; Not produced by move wide instructions, but good to make sure we can return 0 anyway:
12 ; CHECK: orr w0, wzr, #0x1
18 ; CHECK: orr w0, wzr, #0xffff
24 ; CHECK: orr w0, wzr, #0x10000
30 ; CHECK: orr w0, wzr, #0xffff0000
36 ; CHECK: orr x0, xzr, #0x100000000
42 ; CHECK: orr x0, xzr, #0xffff00000000
43 ret i64 281470681743360
48 ; CHECK: orr x0, xzr, #0x1000000000000
49 ret i64 281474976710656
52 ; A 32-bit MOVN can generate some 64-bit patterns that a 64-bit one
53 ; couldn't. Useful even for i64
56 ; CHECK: mov w0, #-60876
66 define i64 @test10() {
67 ; CHECK-LABEL: test10:
68 ; CHECK: mov x0, #-3989504001
69 ret i64 18446744069720047615
72 ; For reasonably legitimate reasons returning an i32 results in the
73 ; selection of an i64 constant, so we need a different idiom to test that selection
76 define void @test11() {
77 ; CHECK-LABEL: test11:
79 store i32 0, i32* @var32
83 define void @test12() {
84 ; CHECK-LABEL: test12:
85 ; CHECK: orr {{w[0-9]+}}, wzr, #0x1
86 store i32 1, i32* @var32
90 define void @test13() {
91 ; CHECK-LABEL: test13:
92 ; CHECK: orr {{w[0-9]+}}, wzr, #0xffff
93 store i32 65535, i32* @var32
97 define void @test14() {
98 ; CHECK-LABEL: test14:
99 ; CHECK: orr {{w[0-9]+}}, wzr, #0x10000
100 store i32 65536, i32* @var32
104 define void @test15() {
105 ; CHECK-LABEL: test15:
106 ; CHECK: orr {{w[0-9]+}}, wzr, #0xffff0000
107 store i32 4294901760, i32* @var32
111 define void @test16() {
112 ; CHECK-LABEL: test16:
113 ; CHECK: mov {{w[0-9]+}}, #-1
114 store i32 -1, i32* @var32
118 define i64 @test17() {
119 ; CHECK-LABEL: test17:
121 ; Mustn't MOVN w0 here.
122 ; CHECK: orr x0, xzr, #0xfffffffffffffffd