mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
6655b5e078
Summary: A number of optimizations are inhibited by single-use TokenFactors not being merged into the TokenFactor using it. This makes we consider if we can do the merge immediately. Most tests changes here are due to the change in visitation causing minor reorderings and associated reassociation of paired memory operations. CodeGen tests with non-reordering changes: X86/aligned-variadic.ll -- memory-based add folded into stored leaq value. X86/constant-combiners.ll -- Optimizes out overlap between stores. X86/pr40631_deadstore_elision -- folds constant byte store into preceding quad word constant store. Reviewers: RKSimon, craig.topper, spatel, efriedma, courbet Reviewed By: courbet Subscribers: dylanmckay, sdardis, nemanjai, jvesely, nhaehnle, javed.absar, eraman, hiraditya, kbarton, jrtc27, atanasyan, jsji, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59260 llvm-svn: 356068
20 lines
776 B
LLVM
20 lines
776 B
LLVM
; RUN: llc < %s -mtriple=armv7-none-linux-gnueabi | FileCheck %s
|
|
|
|
@.str = private unnamed_addr constant [12 x i8] c"val.a = %f\0A\00"
|
|
%struct_t = type { double, double, double }
|
|
@static_val = constant %struct_t { double 1.0, double 2.0, double 3.0 }
|
|
|
|
declare i32 @printf(i8*, ...)
|
|
|
|
; CHECK-LABEL: test_byval_usage_scheduling:
|
|
; CHECK-DAG: str r3, [sp, #12]
|
|
; CHECK-DAG: str r2, [sp, #8]
|
|
; CHECK: vldr d16, [sp, #8]
|
|
define void @test_byval_usage_scheduling(i32 %n1, i32 %n2, %struct_t* byval %val) nounwind {
|
|
entry:
|
|
%a = getelementptr inbounds %struct_t, %struct_t* %val, i32 0, i32 0
|
|
%0 = load double, double* %a
|
|
%call = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i32 0, i32 0), double %0)
|
|
ret void
|
|
}
|