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:
18 ; CHECK: mov w0, #65535
24 ; CHECK: mov w0, #65536
30 ; CHECK: mov w0, #-65536
36 ; CHECK: mov x0, #4294967296
42 ; CHECK: mov x0, #281470681743360
43 ret i64 281470681743360
48 ; CHECK: mov x0, #281474976710656
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: mov {{w[0-9]+}}, #1
86 store i32 1, i32* @var32
90 define void @test13() {
91 ; CHECK-LABEL: test13:
92 ; CHECK: mov {{w[0-9]+}}, #65535
93 store i32 65535, i32* @var32
97 define void @test14() {
98 ; CHECK-LABEL: test14:
99 ; CHECK: mov {{w[0-9]+}}, #65536
100 store i32 65536, i32* @var32
104 define void @test15() {
105 ; CHECK-LABEL: test15:
106 ; CHECK: mov {{w[0-9]+}}, #-65536
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.