48 lines · plain
1; Note: Test option to disable use of non-volatile CR to avoid CR spilling in prologue.2; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu -ppc-disable-non-volatile-cr\3; RUN: -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr < %s | FileCheck --check-prefix=CHECK-DISABLE %s4; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu\5; RUN: -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr < %s | FileCheck --check-prefix=CHECK-ENABLE %s6 7; Function Attrs: nounwind8define dso_local signext i32 @DisableNonVolatileCR(i32 signext %a, i32 signext %b) {9; CHECK-DISABLE-LABEL: DisableNonVolatileCR:10; CHECK-DISABLE: # %bb.0: # %entry11; CHECK-DISABLE-NOT: mfocrf {{r[0-9]+}}12; CHECK-DISABLE-NOT: stw {{r[0-9]+}}13; CHECK-DISABLE: stdu r114; CHECK-DISABLE-DAG: mfocrf [[REG2:r[0-9]+]]15; CHECK-DISABLE-DAG: stw [[REG2]]16; CHECK-DISABLE: # %bb.1: # %if.then17;18; CHECK-ENABLE-LABEL: DisableNonVolatileCR:19; CHECK-ENABLE: # %bb.0: # %entry20; CHECK-ENABLE-DAG: mfocrf [[REG1:r[0-9]+]]21; CHECK-ENABLE-DAG: stw [[REG1]]22; CHECK-ENABLE: stdu r123; CHECK-ENABLE-NOT: mfocrf {{r[0-9]+}}24; CHECK-ENABLE-NOT: stw {{r[0-9]+}}25; CHECK-ENABLE: # %bb.1: # %if.then26 27entry:28 %cmp = icmp slt i32 %a, %b29 br i1 %cmp, label %if.then, label %if.else30 31if.then: ; preds = %entry32 tail call void @fa()33 br label %if.end34 35if.else: ; preds = %entry36 tail call void @fb()37 br label %if.end38 39if.end: ; preds = %if.else, %if.then40 %conv = zext i1 %cmp to i3241 %call = tail call signext i32 @callee(i32 signext %conv)42 ret i32 %call43}44 45declare void @fa(...)46declare void @fb(...)47declare signext i32 @callee(i32 signext)48