Files
clang-p2996/llvm/test/Transforms/NewGVN/pr32845.ll
Bjorn Pettersson 4f73528403 [test][NewGVN] Use -passes=newgvn instead of -newgvn
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
2022-01-28 13:58:22 +01:00

65 lines
2.2 KiB
LLVM

; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt -passes=newgvn %s -S | FileCheck %s
@b = external global i32, align 4
@a = external global i32, align 4
define void @tinkywinky() {
; CHECK-LABEL: @tinkywinky(
; CHECK-NEXT: entry:
; CHECK-NEXT: br label [[L1:%.*]]
; CHECK: l1.loopexit:
; CHECK-NEXT: br label [[L1]]
; CHECK: l1:
; CHECK-NEXT: [[F_0:%.*]] = phi i32* [ @b, [[ENTRY:%.*]] ], [ @a, [[L1_LOOPEXIT:%.*]] ]
; CHECK-NEXT: br label [[FOR_COND:%.*]]
; CHECK: for.cond.loopexit:
; CHECK-NEXT: store i8 poison, i8* null
; CHECK-NEXT: br label [[FOR_COND]]
; CHECK: for.cond:
; CHECK-NEXT: br i1 undef, label [[FOR_END14:%.*]], label [[FOR_COND1_PREHEADER:%.*]]
; CHECK: for.cond1.preheader:
; CHECK-NEXT: br label [[FOR_BODY3:%.*]]
; CHECK: for.cond1:
; CHECK-NEXT: br label [[L2:%.*]]
; CHECK: for.body3:
; CHECK-NEXT: br i1 undef, label [[FOR_COND1:%.*]], label [[L1_LOOPEXIT]]
; CHECK: l2:
; CHECK-NEXT: [[G_4:%.*]] = phi i32* [ @b, [[FOR_END14]] ], [ @a, [[FOR_COND1]] ]
; CHECK-NEXT: [[F_2:%.*]] = phi i32* [ [[F_0]], [[FOR_END14]] ], [ @a, [[FOR_COND1]] ]
; CHECK-NEXT: br label [[FOR_INC:%.*]]
; CHECK: for.inc:
; CHECK-NEXT: br i1 false, label [[FOR_COND_LOOPEXIT:%.*]], label [[FOR_INC]]
; CHECK: for.end14:
; CHECK-NEXT: br label [[L2]]
;
entry:
br label %l1
l1.loopexit:
%g.223.lcssa = phi i32* [ @b, %for.body3 ]
br label %l1
l1:
%g.0 = phi i32* [ undef, %entry ], [ %g.223.lcssa, %l1.loopexit ]
%f.0 = phi i32* [ @b, %entry ], [ @a, %l1.loopexit ]
br label %for.cond
for.cond.loopexit:
br label %for.cond
for.cond:
%g.1 = phi i32* [ %g.0, %l1 ], [ %g.4, %for.cond.loopexit ]
%f.1 = phi i32* [ %f.0, %l1 ], [ %f.2, %for.cond.loopexit ]
br i1 undef, label %for.end14, label %for.cond1.preheader
for.cond1.preheader:
br label %for.body3
for.cond1:
br label %l2
for.body3:
br i1 undef, label %for.cond1, label %l1.loopexit
l2:
%g.4 = phi i32* [ %g.1, %for.end14 ], [ @a, %for.cond1 ]
%f.2 = phi i32* [ %f.1, %for.end14 ], [ @a, %for.cond1 ]
br label %for.inc
for.inc:
br i1 false, label %for.cond.loopexit, label %for.inc
for.end14:
br label %l2
}