mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-23 19:59:57 +00:00
3bbf394145
Recommiting with compiler time improvements Recommitting after fixup of 32-bit aliasing sign offset bug in DAGCombiner. * Simplify Consecutive Merge Store Candidate Search Now that address aliasing is much less conservative, push through simplified store merging search and chain alias analysis which only checks for parallel stores through the chain subgraph. This is cleaner as the separation of non-interfering loads/stores from the store-merging logic. When merging stores search up the chain through a single load, and finds all possible stores by looking down from through a load and a TokenFactor to all stores visited. This improves the quality of the output SelectionDAG and the output Codegen (save perhaps for some ARM cases where we correctly constructs wider loads, but then promotes them to float operations which appear but requires more expensive constant generation). Some minor peephole optimizations to deal with improved SubDAG shapes (listed below) Additional Minor Changes: 1. Finishes removing unused AliasLoad code 2. Unifies the chain aggregation in the merged stores across code paths 3. Re-add the Store node to the worklist after calling SimplifyDemandedBits. 4. Increase GatherAllAliasesMaxDepth from 6 to 18. That number is arbitrary, but seems sufficient to not cause regressions in tests. 5. Remove Chain dependencies of Memory operations on CopyfromReg nodes as these are captured by data dependence 6. Forward loads-store values through tokenfactors containing {CopyToReg,CopyFromReg} Values. 7. Peephole to convert buildvector of extract_vector_elt to extract_subvector if possible (see CodeGen/AArch64/store-merge.ll) 8. Store merging for the ARM target is restricted to 32-bit as some in some contexts invalid 64-bit operations are being generated. This can be removed once appropriate checks are added. This finishes the change Matt Arsenault started in r246307 and jyknight's original patch. Many tests required some changes as memory operations are now reorderable, improving load-store forwarding. One test in particular is worth noting: CodeGen/PowerPC/ppc64-align-long-double.ll - Improved load-store forwarding converts a load-store pair into a parallel store and a memory-realized bitcast of the same value. However, because we lose the sharing of the explicit and implicit store values we must create another local store. A similar transformation happens before SelectionDAG as well. Reviewers: arsenm, hfinkel, tstellarAMD, jyknight, nhaehnle git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297695 91177308-0d34-0410-b5e6-96231b3b80d8
42 lines
1.4 KiB
LLVM
42 lines
1.4 KiB
LLVM
; RUN: llc < %s -mtriple=arm-apple-ios -arm-atomic-cfg-tidy=0 -mcpu=cortex-a9 | FileCheck %s
|
|
; rdar://8402126
|
|
; Make sure if-converter is not predicating vldmia and ldmia. These are
|
|
; micro-coded and would have long issue latency even if predicated on
|
|
; false predicate.
|
|
|
|
define void @t(double %a, double %b, double %c, double %d, i32* nocapture %solutions, double* nocapture %x) nounwind "no-frame-pointer-elim"="true" {
|
|
entry:
|
|
; CHECK-LABEL: t:
|
|
; CHECK: vpop {d8}
|
|
; CHECK-NOT: vpopne
|
|
; CHECK: pop {r7, pc}
|
|
br i1 undef, label %if.else, label %if.then
|
|
|
|
if.then: ; preds = %entry
|
|
%mul73 = fmul double undef, 0.000000e+00
|
|
%sub76 = fsub double %mul73, undef
|
|
store double %sub76, double* undef, align 4
|
|
%call88 = tail call double @cos(double 0.000000e+00) nounwind
|
|
%mul89 = fmul double undef, %call88
|
|
%sub92 = fsub double %mul89, undef
|
|
store double %sub92, double* undef, align 4
|
|
ret void
|
|
|
|
if.else: ; preds = %entry
|
|
%tmp101 = tail call double @llvm.pow.f64(double undef, double 0x3FD5555555555555)
|
|
%add112 = fadd double %tmp101, undef
|
|
%mul118 = fmul double %add112, undef
|
|
store double 0.000000e+00, double* %x, align 4
|
|
ret void
|
|
}
|
|
|
|
declare double @acos(double)
|
|
|
|
declare double @sqrt(double) readnone
|
|
|
|
declare double @cos(double) readnone
|
|
|
|
declare double @fabs(double)
|
|
|
|
declare double @llvm.pow.f64(double, double) nounwind readonly
|