Use the new PM syntax when specifying the pipeline in regression tests previously running "opt -newgvn ..." Instead we now do "opt -passes=newgvn ..." Notice that this also changes the aa-pipeline to become the default aa-pipeline instead of just basic-aa. Since these tests haven't been explicitly requesting basic-aa in the past (compared to the test cases updated in a separate patch involving "-basic-aa -newgvn") it is assumed that the exact aa-pipeline isn't important for the validity of the test cases. An alternative could have been to add -aa-pipeline=basic-aa as well to the run lines, but that might just add clutter in case the test cases do not care about the aa-pipeline. This is another step to move away from the legacy PM syntax when specifying passes in opt. Differential Revision: https://reviews.llvm.org/D118341
32 lines
1.0 KiB
LLVM
32 lines
1.0 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
|
|
; RUN: opt -passes=newgvn %s -S -o - | FileCheck %s
|
|
define hidden void @foo() {
|
|
; CHECK-LABEL: @foo(
|
|
; CHECK-NEXT: top:
|
|
; CHECK-NEXT: br label [[IF:%.*]]
|
|
; CHECK: if:
|
|
; CHECK-NEXT: br i1 false, label [[L50:%.*]], label [[IF]]
|
|
; CHECK: L50:
|
|
; CHECK-NEXT: store i8 poison, i8* null
|
|
; CHECK-NEXT: ret void
|
|
;
|
|
top:
|
|
%.promoted = load double, double* undef, align 8
|
|
br label %if
|
|
|
|
;; This is really a multi-valued phi, because the phi is defined by an expression of the phi.
|
|
;; This means that we can't propagate the value over the backedge, because we'll just cycle
|
|
;; through every value.
|
|
|
|
if: ; preds = %if, %top
|
|
%0 = phi double [ %1, %if ], [ %.promoted, %top ]
|
|
%1 = fadd double %0, 1.0
|
|
br i1 false, label %L50, label %if
|
|
|
|
L50: ; preds = %if
|
|
%.lcssa = phi double [ %1, %if ]
|
|
store double %.lcssa, double* undef, align 8
|
|
ret void
|
|
}
|
|
|