1 # RUN: llc -run-pass mir-namer -x mir -verify-machineinstrs %s -o - | FileCheck %s
2 # RUN: llc -run-pass mir-canonicalizer -x mir -verify-machineinstrs %s -o - | FileCheck %s
3 # RUN: llc -run-pass mir-namer -mir-vreg-namer-use-stable-hash -x mir -verify-machineinstrs %s -o - | FileCheck %s
4 # RUN: llc -run-pass mir-canonicalizer -mir-vreg-namer-use-stable-hash -x mir -verify-machineinstrs %s -o - | FileCheck %s
6 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
7 target triple = "x86_64-unknown-linux-gnu"
8 define i32 @_Z1fi(i32 %arg) {
9 %tmp = alloca i32, align 4
10 %tmp1 = alloca i32, align 4
18 - { id: 0, class: _, preferred-register: '' }
19 - { id: 1, class: _, preferred-register: '' }
20 - { id: 2, class: _, preferred-register: '' }
21 - { id: 3, class: _, preferred-register: '' }
22 - { id: 4, class: _, preferred-register: '' }
23 - { id: 5, class: _, preferred-register: '' }
24 - { id: 6, class: _, preferred-register: '' }
25 - { id: 7, class: _, preferred-register: '' }
26 - { id: 8, class: _, preferred-register: '' }
28 - { id: 0, name: tmp, type: default, offset: 0, size: 4, alignment: 4 }
29 - { id: 1, name: tmp1, type: default, offset: 0, size: 4, alignment: 4 }
32 %tmp0:_(s32) = COPY $edi
33 %tmp1:_(s32) = G_CONSTANT i32 0
34 %tmp5:_(p0) = G_FRAME_INDEX %stack.0.tmp
35 %tmp6:_(p0) = G_FRAME_INDEX %stack.1.tmp1
36 G_STORE %tmp0(s32), %tmp5(p0) :: (store (s32) into %ir.tmp)
37 %tmp7:_(s32) = G_LOAD %tmp5(p0) :: (load (s32) from %ir.tmp)
38 %tmp8:_(s1) = G_ICMP intpred(ne), %tmp7(s32), %tmp1
39 G_BRCOND %tmp8(s1), %bb.1
43 ; CHECK: %bb2_{{[0-9a-f]+}}__1:_(s32) = G_CONSTANT
45 %tmp4:_(s32) = G_CONSTANT i32 1
46 G_STORE %tmp4(s32), %tmp6(p0) :: (store (s32) into %ir.tmp1)
51 ; CHECK: %bb1_{{[0-9a-f]+}}__1:_(s32) = G_CONSTANT
53 %tmp3:_(s32) = G_CONSTANT i32 2
54 G_STORE %tmp3(s32), %tmp6(p0) :: (store (s32) into %ir.tmp1)
57 ; CHECK: %bb3_{{[0-9a-f]+}}__1:_(s32) = G_LOAD
59 %tmp9:_(s32) = G_LOAD %tmp6(p0) :: (load (s32) from %ir.tmp1)
60 $eax = COPY %tmp9(s32)