1 # RUN: llc -mtriple=ppc32-- %s -run-pass=phi-node-elimination \
2 # RUN: -verify-machineinstrs -o /dev/null 2>&1
3 # RUN: llc -mtriple=ppc32-- %s -start-before=phi-node-elimination \
4 # RUN: -verify-machineinstrs -o /dev/null 2>&1
7 define void @VerifyTwoAddressCrash(i16 %div.0.i.i.i.i, i32 %L_num.0.i.i.i.i, i32 %tmp1.i.i206.i.i, ptr %P) {
8 %X = shl i16 %div.0.i.i.i.i, 1
9 %tmp28.i.i.i.i = shl i32 %L_num.0.i.i.i.i, 1
10 %tmp31.i.i.i.i = icmp slt i32 %tmp28.i.i.i.i, %tmp1.i.i206.i.i
11 %tmp31.i.i.i.i.upgrd.1 = zext i1 %tmp31.i.i.i.i to i16
12 %tmp371.i.i.i.i1 = or i16 %tmp31.i.i.i.i.upgrd.1, %X
13 %div.0.be.i.i.i.i = xor i16 %tmp371.i.i.i.i1, 1
14 store i16 %div.0.be.i.i.i.i, ptr %P, align 2
20 name: VerifyTwoAddressCrash
22 exposesReturnsTwice: false
24 regBankSelected: false
27 tracksRegLiveness: true
30 - { id: 0, class: gprc, preferred-register: '' }
31 - { id: 1, class: gprc, preferred-register: '' }
32 - { id: 2, class: gprc, preferred-register: '' }
33 - { id: 3, class: gprc_and_gprc_nor0, preferred-register: '' }
34 - { id: 4, class: gprc, preferred-register: '' }
35 - { id: 5, class: crrc, preferred-register: '' }
36 - { id: 6, class: crbitrc, preferred-register: '' }
37 - { id: 7, class: gprc_and_gprc_nor0, preferred-register: '' }
38 - { id: 8, class: gprc_and_gprc_nor0, preferred-register: '' }
39 - { id: 9, class: gprc, preferred-register: '' }
40 - { id: 10, class: gprc, preferred-register: '' }
41 - { id: 11, class: gprc, preferred-register: '' }
43 - { reg: '$r3', virtual-reg: '%0' }
44 - { reg: '$r4', virtual-reg: '%1' }
45 - { reg: '$r5', virtual-reg: '%2' }
46 - { reg: '$r6', virtual-reg: '%3' }
48 isFrameAddressTaken: false
49 isReturnAddressTaken: false
58 maxCallFrameSize: 4294967295
59 cvBytesOfCalleeSavedRegisters: 0
60 hasOpaqueSPAdjustment: false
62 hasMustTailInVarArgFunc: false
70 machineFunctionInfo: {}
73 liveins: $r3, $r4, $r5, $r6
75 %3:gprc_and_gprc_nor0 = COPY killed $r6
76 %2:gprc = COPY killed $r5
77 %1:gprc = COPY killed $r4
78 %0:gprc = COPY killed $r3
79 %4:gprc = RLWINM killed %1, 1, 0, 30
80 %5:crrc = CMPW killed %4, killed %2
81 %6:crbitrc = COPY killed %5.sub_lt
82 %7:gprc_and_gprc_nor0 = LI 0
83 %8:gprc_and_gprc_nor0 = LI 1
84 %9:gprc = ISEL killed %8, killed %7, killed %6
85 %10:gprc = RLWIMI killed %9, killed %0, 1, 0, 30
86 %11:gprc = XORI killed %10, 1
87 STH killed %11, 0, killed %3 :: (store (s16) into %ir.P)
88 BLR implicit $lr, implicit $rm
94 # Bad machine code: Two-address instruction operands must be identical
95 # - function: VerifyTwoAddressCrash
96 # - basic block: %bb.0
97 # - instruction: %10:gprc = RLWIMI killed %9:gprc(tied-def 0), killed %0:gprc, 1, 0, 30
98 # - operand 1: killed %9:gprc(tied-def 0)
99 # LLVM ERROR: Found 1 machine code errors.
100 # Just verify that we do not crash (or get verifier error).