mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-28 23:43:50 +00:00
8b2b8a1835
This update was done with the following bash script: find test/CodeGen -name "*.ll" | \ while read NAME; do echo "$NAME" if ! grep -q "^; *RUN: *llc.*debug" $NAME; then TEMP=`mktemp -t temp` cp $NAME $TEMP sed -n "s/^define [^@]*@\([A-Za-z0-9_]*\)(.*$/\1/p" < $NAME | \ while read FUNC; do sed -i '' "s/;\(.*\)\([A-Za-z0-9_-]*\):\( *\)$FUNC: *\$/;\1\2-LABEL:\3$FUNC:/g" $TEMP done sed -i '' "s/;\(.*\)-LABEL-LABEL:/;\1-LABEL:/" $TEMP sed -i '' "s/;\(.*\)-NEXT-LABEL:/;\1-NEXT:/" $TEMP sed -i '' "s/;\(.*\)-NOT-LABEL:/;\1-NOT:/" $TEMP sed -i '' "s/;\(.*\)-DAG-LABEL:/;\1-DAG:/" $TEMP mv $TEMP $NAME fi done git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186280 91177308-0d34-0410-b5e6-96231b3b80d8
45 lines
1.6 KiB
LLVM
45 lines
1.6 KiB
LLVM
; RUN: llc < %s -mtriple=x86_64-pc-linux | FileCheck %s
|
|
|
|
; Check that the CodeGenPrepare Pass
|
|
; does not wrongly rewrite the address computed by Instruction %4
|
|
; as [12 + Base:%this].
|
|
|
|
; This test makes sure that:
|
|
; - both the store and the first load instructions
|
|
; within basic block labeled 'if.then' are not removed.
|
|
; - the store instruction stores a value at address [60 + %this]
|
|
; - the first load instruction loads a value at address [12 + %this]
|
|
|
|
%class.A = type { %struct.B }
|
|
%struct.B = type { %class.C, %class.D, %class.C, %class.D }
|
|
%class.C = type { float, float, float }
|
|
%class.D = type { [3 x %class.C] }
|
|
|
|
define linkonce_odr void @foo(%class.A* nocapture %this, i32 %BoolValue) nounwind uwtable {
|
|
entry:
|
|
%cmp = icmp eq i32 %BoolValue, 0
|
|
%address1 = getelementptr inbounds %class.A* %this, i64 0, i32 0, i32 3
|
|
%address2 = getelementptr inbounds %class.A* %this, i64 0, i32 0, i32 1
|
|
br i1 %cmp, label %if.else, label %if.then
|
|
|
|
if.then: ; preds = %entry
|
|
%0 = getelementptr inbounds %class.D* %address2, i64 0, i32 0, i64 0, i32 0
|
|
%1 = load float* %0, align 4
|
|
%2 = getelementptr inbounds float* %0, i64 3
|
|
%3 = load float* %2, align 4
|
|
%4 = getelementptr inbounds %class.D* %address1, i64 0, i32 0, i64 0, i32 0
|
|
store float %1, float* %4, align 4
|
|
br label %if.end
|
|
|
|
if.else: ; preds = %entry
|
|
br label %if.end
|
|
|
|
if.end: ; preds = %if.then, %if.else, %entry
|
|
ret void
|
|
}
|
|
|
|
; CHECK-LABEL: foo:
|
|
; CHECK: movss 12([[THIS:%[a-zA-Z0-9]+]]), [[REGISTER:%[a-zA-Z0-9]+]]
|
|
; CHECK-NEXT: movss [[REGISTER]], 60([[THIS]])
|
|
|