109 lines · plain
1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py2# RUN: llc %s -o - -mtriple=x86_64-unknown-linux-gnu -run-pass=x86-flags-copy-lowering -verify-machineinstrs | FileCheck %s3 4--- |5 ; ModuleID = 'bugpoint-reduced-simplified.ll'6 source_filename = "test.c"7 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"8 target triple = "x86_64-unknown-linux-gnu"9 10 @a = external global i32, align 411 12 declare void @e()13 14 define void @f() {15 entry:16 br label %for.body17 18 for.body: ; preds = %for.body, %entry19 %0 = load i32, ptr @a, align 420 %conv = sext i32 %0 to i6421 %1 = load i64, ptr undef, align 822 %or = or i64 %1, %conv23 store i64 %or, ptr undef, align 824 call void @e()25 %cmp4 = icmp eq i64 %or, 026 %conv5 = zext i1 %cmp4 to i3227 %conv6 = trunc i32 %conv5 to i828 store i8 %conv6, ptr undef, align 129 %conv7 = sext i8 %conv6 to i3230 %bf.cast = trunc i40 undef to i3231 %xor = xor i32 %conv7, %bf.cast32 %conv8 = sext i32 %xor to i6433 store i64 %conv8, ptr undef, align 834 br label %for.body35 }36 37...38---39name: f40alignment: 1641tracksRegLiveness: true42registers:43 - { id: 0, class: gr64 }44 - { id: 1, class: gr64 }45 - { id: 2, class: gr32 }46 - { id: 3, class: gr64 }47 - { id: 4, class: gr32 }48 - { id: 5, class: gr32 }49 - { id: 6, class: gr32 }50 - { id: 7, class: gr64 }51 - { id: 8, class: gr64 }52 - { id: 9, class: gr64 }53 - { id: 10, class: gr64 }54 - { id: 11, class: gr8 }55 - { id: 12, class: gr64 }56frameInfo:57 maxAlignment: 158 hasCalls: true59machineFunctionInfo: {}60body: |61 ; CHECK-LABEL: name: f62 ; CHECK: bb.0.entry:63 ; CHECK: successors: %bb.1(0x80000000)64 ; CHECK: JMP_1 %bb.165 ; CHECK: bb.1.for.body:66 ; CHECK: successors: %bb.1(0x80000000)67 ; CHECK: [[MOV64rm:%[0-9]+]]:gr64 = MOV64rm $rip, 1, $noreg, target-flags(x86-gotpcrel) @a, $noreg :: (load (s64) from got)68 ; CHECK: [[MOVSX64rm32_:%[0-9]+]]:gr64 = MOVSX64rm32 killed [[MOV64rm]], 1, $noreg, 0, $noreg :: (dereferenceable load (s32) from @a)69 ; CHECK: [[DEF:%[0-9]+]]:gr64 = IMPLICIT_DEF70 ; CHECK: OR64mr [[DEF]], 1, $noreg, 0, $noreg, [[MOVSX64rm32_]], implicit-def $eflags :: (store (s64) into `ptr undef`), (load (s64) from `ptr undef`)71 ; CHECK: [[SETCCr:%[0-9]+]]:gr8 = SETCCr 4, implicit $eflags72 ; CHECK: ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp73 ; CHECK: CALL64pcrel32 target-flags(x86-plt) @e, csr_64, implicit $rsp, implicit $ssp, implicit-def $rsp, implicit-def $ssp74 ; CHECK: ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp75 ; CHECK: [[MOVZX32rr8_:%[0-9]+]]:gr32 = MOVZX32rr8 [[SETCCr]]76 ; CHECK: [[DEF1:%[0-9]+]]:gr64 = IMPLICIT_DEF77 ; CHECK: MOV8mr [[DEF1]], 1, $noreg, 0, $noreg, [[SETCCr]] :: (store (s8) into `ptr undef`)78 ; CHECK: [[DEF2:%[0-9]+]]:gr32 = IMPLICIT_DEF79 ; CHECK: [[XOR32rr:%[0-9]+]]:gr32 = XOR32rr [[MOVZX32rr8_]], [[DEF2]], implicit-def $eflags80 ; CHECK: [[MOVSX64rr32_:%[0-9]+]]:gr64 = MOVSX64rr32 [[XOR32rr]]81 ; CHECK: [[DEF3:%[0-9]+]]:gr64 = IMPLICIT_DEF82 ; CHECK: MOV64mr [[DEF3]], 1, $noreg, 0, $noreg, [[MOVSX64rr32_]] :: (store (s64) into `ptr undef`)83 ; CHECK: JMP_1 %bb.184 bb.0.entry:85 JMP_1 %bb.186 87 bb.1.for.body:88 %7:gr64 = MOV64rm $rip, 1, $noreg, target-flags(x86-gotpcrel) @a, $noreg :: (load (s64) from got)89 %8:gr64 = MOVSX64rm32 killed %7, 1, $noreg, 0, $noreg :: (dereferenceable load (s32) from @a)90 %9:gr64 = IMPLICIT_DEF91 OR64mr %9, 1, $noreg, 0, $noreg, %8, implicit-def $eflags :: (store (s64) into `ptr undef`), (load (s64) from `ptr undef`)92 %10:gr64 = COPY $eflags93 ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp94 CALL64pcrel32 target-flags(x86-plt) @e, csr_64, implicit $rsp, implicit $ssp, implicit-def $rsp, implicit-def $ssp95 ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp96 $eflags = COPY %1097 %11:gr8 = SETCCr 4, implicit $eflags98 %4:gr32 = MOVZX32rr8 killed %1199 %12:gr64 = IMPLICIT_DEF100 SETCCm %12, 1, $noreg, 0, $noreg, 4, implicit $eflags :: (store (s8) into `ptr undef`)101 %5:gr32 = IMPLICIT_DEF102 %6:gr32 = XOR32rr %4, %5, implicit-def $eflags103 %3:gr64 = MOVSX64rr32 %6104 %0:gr64 = IMPLICIT_DEF105 MOV64mr %0, 1, $noreg, 0, $noreg, %3 :: (store (s64) into `ptr undef`)106 JMP_1 %bb.1107 108...109