90 lines · plain
1# RUN: llc -start-after=dead-mi-elimination -stop-after=twoaddressinstruction -o - %s | FileCheck %s2 3--- |4 target datalayout = "E-m:e-i64:64-n32:64"5 target triple = "powerpc64-unknown-linux-gnu"6 7 @d = global i32 15, align 48 @b = global ptr @d, align 89 @a = common global i32 0, align 410 11 ; Function Attrs: nounwind12 define signext i32 @main() #0 {13 entry:14 %0 = load ptr, ptr @b, align 815 %1 = load i32, ptr @a, align 416 %lnot = icmp eq i32 %1, 017 %lnot.ext = zext i1 %lnot to i3218 %shr.i = lshr i32 2072, %lnot.ext19 %call.lobit = lshr i32 %shr.i, 720 %2 = and i32 %call.lobit, 121 %3 = load i32, ptr %0, align 422 %or = or i32 %2, %323 store i32 %or, ptr %0, align 424 %4 = load i32, ptr @a, align 425 %lnot.1 = icmp eq i32 %4, 026 %lnot.ext.1 = zext i1 %lnot.1 to i3227 %shr.i.1 = lshr i32 2072, %lnot.ext.128 %call.lobit.1 = lshr i32 %shr.i.1, 729 %5 = and i32 %call.lobit.1, 130 %or.1 = or i32 %5, %or31 store i32 %or.1, ptr %0, align 432 ret i32 %or.133 }34 35 attributes #0 = { nounwind "target-cpu"="ppc64" }36 37...38---39name: main40alignment: 441exposesReturnsTwice: false42tracksRegLiveness: true43registers:44 - { id: 0, class: g8rc_and_g8rc_nox0 }45 - { id: 1, class: g8rc_and_g8rc_nox0 }46 - { id: 2, class: gprc }47 - { id: 3, class: gprc }48 - { id: 4, class: gprc }49 - { id: 5, class: g8rc_and_g8rc_nox0 }50 - { id: 6, class: g8rc_and_g8rc_nox0 }51 - { id: 7, class: gprc }52 - { id: 8, class: gprc }53 - { id: 9, class: gprc }54 - { id: 10, class: g8rc }55frameInfo:56 isFrameAddressTaken: false57 isReturnAddressTaken: false58 hasStackMap: false59 hasPatchPoint: false60 stackSize: 061 offsetAdjustment: 062 maxAlignment: 063 adjustsStack: false64 hasCalls: false65 maxCallFrameSize: 066 hasOpaqueSPAdjustment: false67 hasVAStart: false68 hasMustTailInVarArgFunc: false69body: |70 bb.0.entry:71 liveins: $x272 73 %0 = ADDIStocHA8 $x2, @b74 %1 = LD target-flags(ppc-toc-lo) @b, killed %0 :: (load (s64) from @b)75 %2 = LWZ 0, %1 :: (load (s32) from %ir.0)76 %3 = LI 077 %4 = RLWIMI %3, killed %2, 0, 0, 3178 ; CHECK-LABEL: name: main79 ; CHECK: %[[REG1:[0-9]+]]:gprc = LI 080 ; CHECK: %[[REG2:[0-9]+]]:gprc = COPY %[[REG1]]81 ; CHECK: %[[REG2]]:gprc = RLWIMI %[[REG2]], killed %2, 0, 0, 3182 %8 = RLWIMI %3, %4, 0, 0, 3183 STW %4, 0, %1 :: (store (s32) into %ir.0)84 %10 = EXTSW_32_64 %885 STW %8, 0, %1 :: (store (s32) into %ir.0)86 $x3 = COPY %1087 BLR8 implicit $x3, implicit $lr8, implicit $rm88 89...90