1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=i586-linux-gnu -mcpu=haswell -mattr=-slow-incdec -run-pass=instruction-select %s -o - | FileCheck %s --check-prefix=CHECK
4 # This is necessary to test that attribute-based rule predicates work and that
5 # they properly reset between functions.
8 define i32 @const_i32_1() {
12 define i32 @const_i32_1_optsize() #0 {
16 define i32 @const_i32_1b() {
20 define i32 @const_i32_1_optsizeb() #0 {
24 attributes #0 = { optsize }
32 - { id: 0, class: gpr }
35 ; CHECK-LABEL: name: const_i32_1
36 ; CHECK: [[MOV32ri:%[0-9]+]]:gr32 = MOV32ri 1
37 ; CHECK: $eax = COPY [[MOV32ri]]
38 ; CHECK: RET 0, implicit $eax
39 %0(s32) = G_CONSTANT i32 1
44 name: const_i32_1_optsize
49 - { id: 0, class: gpr }
52 ; CHECK-LABEL: name: const_i32_1_optsize
53 ; CHECK: [[MOV32r1_:%[0-9]+]]:gr32 = MOV32r1 implicit-def $eflags
54 ; CHECK: $eax = COPY [[MOV32r1_]]
55 ; CHECK: RET 0, implicit $eax
56 %0(s32) = G_CONSTANT i32 1
66 - { id: 0, class: gpr }
69 ; CHECK-LABEL: name: const_i32_1b
70 ; CHECK: [[MOV32ri:%[0-9]+]]:gr32 = MOV32ri 1
71 ; CHECK: $eax = COPY [[MOV32ri]]
72 ; CHECK: RET 0, implicit $eax
73 %0(s32) = G_CONSTANT i32 1
78 name: const_i32_1_optsizeb
83 - { id: 0, class: gpr }
86 ; CHECK-LABEL: name: const_i32_1_optsizeb
87 ; CHECK: [[MOV32r1_:%[0-9]+]]:gr32 = MOV32r1 implicit-def $eflags
88 ; CHECK: $eax = COPY [[MOV32r1_]]
89 ; CHECK: RET 0, implicit $eax
90 %0(s32) = G_CONSTANT i32 1