mirror of
https://github.com/RPCS3/llvm.git
synced 2026-07-19 15:13:49 -04:00
154874adc5
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356068 91177308-0d34-0410-b5e6-96231b3b80d8
31 lines
1.3 KiB
LLVM
31 lines
1.3 KiB
LLVM
; RUN: llc < %s -mtriple=x86_64-apple-darwin -stack-symbol-ordering=0 | FileCheck %s -check-prefix=X64
|
|
; RUN: llc < %s -mtriple=i686-apple-darwin -stack-symbol-ordering=0 | FileCheck %s -check-prefix=X32
|
|
|
|
%struct.Baz = type { [17 x i8] }
|
|
%struct.__va_list_tag = type { i32, i32, i8*, i8* }
|
|
|
|
; Function Attrs: nounwind uwtable
|
|
define void @bar(%struct.Baz* byval nocapture readnone align 8 %x, ...) {
|
|
entry:
|
|
%va = alloca [1 x %struct.__va_list_tag], align 16
|
|
%arraydecay = getelementptr inbounds [1 x %struct.__va_list_tag], [1 x %struct.__va_list_tag]* %va, i64 0, i64 0
|
|
%arraydecay1 = bitcast [1 x %struct.__va_list_tag]* %va to i8*
|
|
call void @llvm.va_start(i8* %arraydecay1)
|
|
%overflow_arg_area_p = getelementptr inbounds [1 x %struct.__va_list_tag], [1 x %struct.__va_list_tag]* %va, i64 0, i64 0, i32 2
|
|
%overflow_arg_area = load i8*, i8** %overflow_arg_area_p, align 8
|
|
%overflow_arg_area.next = getelementptr i8, i8* %overflow_arg_area, i64 24
|
|
store i8* %overflow_arg_area.next, i8** %overflow_arg_area_p, align 8
|
|
; X32: leal 68(%esp), [[REG:%.*]]
|
|
; X32: movl [[REG]], 16(%esp)
|
|
; X64: leaq 256(%rsp), [[REG:%.*]]
|
|
; X64: movq [[REG]], 184(%rsp)
|
|
; X64: leaq 176(%rsp), %rdi
|
|
call void @qux(%struct.__va_list_tag* %arraydecay)
|
|
ret void
|
|
}
|
|
|
|
; Function Attrs: nounwind
|
|
declare void @llvm.va_start(i8*)
|
|
|
|
declare void @qux(%struct.__va_list_tag*)
|