Bjorn Pettersson 3f8027fb67 [test] Update some test cases to use -passes when specifying the pipeline
This updates transform test cases for
  ADCE
  AddDiscriminators
  AggressiveInstCombine
  AlignmentFromAssumptions
  ArgumentPromotion
  BDCE
  CalledValuePropagation
  DCE
  Reg2Mem
  WholeProgramDevirt
to use the -passes syntax when specifying the pipeline.

Given that LLVM_ENABLE_NEW_PASS_MANAGER isn't set to off (which is
a deprecated feature) the updated test cases already used the new
pass manager, but they were using the legacy syntax when specifying
the passes to run. This patch can be seen as a step toward deprecating
that interface.

This patch also removes some redundant RUN lines. Here I am
referring to test cases that had multiple RUN lines verifying both
the legacy "-passname" syntax and the new "-passes=passname" syntax.
Since we switched the default pass manager to "new PM" both RUN lines
have verified the new PM version of the pass (more or less wasting
time running the same test twice), unless LLVM_ENABLE_NEW_PASS_MANAGER
is set to "off". It is assumed that it is enough to run these tests
with the new pass manager now.

Differential Revision: https://reviews.llvm.org/D108472
2021-09-29 21:51:08 +02:00

89 lines
2.7 KiB
LLVM

; RUN: opt -passes=reg2mem -disable-output < %s
; PR14782
declare void @f1()
declare i32 @__gxx_personality_sj0(...)
declare void @f2()
declare void @f3()
declare void @f4_()
declare void @_Z12xxxdtsP10xxxpq()
define hidden void @_ZN12xxxyzIi9xxxwLi29ELi0EE4f3NewES0_i() ssp align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) {
bb:
invoke void @f4_()
to label %bb1 unwind label %.thread
.thread: ; preds = %bb
%tmp = landingpad { i8*, i32 }
cleanup
br label %bb13
bb1: ; preds = %bb
invoke void @f1()
to label %.noexc unwind label %bb10
.noexc: ; preds = %bb1
invoke void @f4_()
to label %bb6 unwind label %bb2
bb2: ; preds = %.noexc
%tmp3 = landingpad { i8*, i32 }
cleanup
invoke void @f3()
to label %.body unwind label %bb4
bb4: ; preds = %bb2
%tmp5 = landingpad { i8*, i32 }
catch i8* null
unreachable
bb6: ; preds = %.noexc
invoke void @_Z12xxxdtsP10xxxpq()
to label %_ZN6xxxdIN12xxxyzIi9xxxwLi29ELi0EE4fr1jS3_.exit unwind label %bb10
_ZN6xxxdIN12xxxyzIi9xxxwLi29ELi0EE4fr1jS3_.exit: ; preds = %bb6
invoke void @f2()
to label %bb7 unwind label %bb8
bb7: ; preds = %_ZN6xxxdIN12xxxyzIi9xxxwLi29ELi0EE4fr1jS3_.exit
ret void
bb8: ; preds = %_ZN6xxxdIN12xxxyzIi9xxxwLi29ELi0EE4fr1jS3_.exit
%tmp9 = landingpad { i8*, i32 }
cleanup
br label %_ZN10xxxpqdlev.exit
bb10: ; preds = %bb6, %bb1
%.1 = phi i1 [ true, %bb1 ], [ false, %bb6 ]
%tmp11 = landingpad { i8*, i32 }
cleanup
br label %.body
.body: ; preds = %bb10, %bb2
%.1.lpad-body = phi i1 [ %.1, %bb10 ], [ true, %bb2 ]
invoke void @f2()
to label %bb12 unwind label %bb14
bb12: ; preds = %.body
br i1 %.1.lpad-body, label %bb13, label %_ZN10xxxpqdlev.exit
bb13: ; preds = %bb12, %.thread
invoke void @xxx_MemFree()
to label %_ZN10xxxpqdlev.exit unwind label %bb14
_ZN10xxxpqdlev.exit: ; preds = %bb13, %bb12, %bb8
resume { i8*, i32 } undef
bb14: ; preds = %bb13, %.body
%tmp15 = landingpad { i8*, i32 }
catch i8* null
unreachable
}
declare void @xxx_MemFree()