1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py 2; RUN: llc -mtriple=x86_64-linux-gnu -global-isel -verify-machineinstrs < %s -o - | FileCheck %s --check-prefix=ALL --check-prefix=X64 3 4define i8 @const_i8() { 5; ALL-LABEL: const_i8: 6; ALL: # %bb.0: 7; ALL-NEXT: movb $2, %al 8; ALL-NEXT: retq 9 ret i8 2 10} 11 12define i16 @const_i16() { 13; ALL-LABEL: const_i16: 14; ALL: # %bb.0: 15; ALL-NEXT: movw $3, %ax 16; ALL-NEXT: retq 17 ret i16 3 18} 19 20define i32 @const_i32() { 21; ALL-LABEL: const_i32: 22; ALL: # %bb.0: 23; ALL-NEXT: movl $4, %eax 24; ALL-NEXT: retq 25 ret i32 4 26} 27 28define i64 @const_i64() { 29; ALL-LABEL: const_i64: 30; ALL: # %bb.0: 31; ALL-NEXT: movabsq $68719476720, %rax # imm = 0xFFFFFFFF0 32; ALL-NEXT: retq 33 ret i64 68719476720 34} 35 36;i64 value fit into u32 37define i64 @const_i64_u32() { 38; ALL-LABEL: const_i64_u32: 39; ALL: # %bb.0: 40; ALL-NEXT: movq $1879048192, %rax # imm = 0x70000000 41; ALL-NEXT: retq 42 ret i64 1879048192 43} 44 45;i64 value fit into i32 46define i64 @const_i64_i32() { 47; ALL-LABEL: const_i64_i32: 48; ALL: # %bb.0: 49; ALL-NEXT: movq $-1, %rax 50; ALL-NEXT: retq 51 ret i64 -1 52} 53 54define void @main(i32 ** %data) { 55; ALL-LABEL: main: 56; ALL: # %bb.0: 57; ALL-NEXT: movq $0, %rax 58; ALL-NEXT: movq %rax, (%rdi) 59; ALL-NEXT: retq 60 store i32* null, i32** %data, align 8 61 ret void 62} 63 64