Files
clang-p2996/llvm/test/Transforms/NewGVN/pr31472.ll
Bjorn Pettersson bcdcf984cc [test][NewGVN] Use '-passes=newgvn' instead of '-basic-aa -newgvn'
This updates NewGVN test cases that were running
  "opt -basic-aa -newgvn ..."
to run
  "opt -passes=newgvn ..."
instead.

The pipeline will be more similar to what we used to have with
legacy PM by doing it this way. The compatility mode that we've
been using for awhile during transition from legacy PM to new PM,
i.e. using the legacy syntax together with new PM, has resulted in
a pipeline such as
  -passes='function(require<basic-aa>),function(newgvn)'
but running the analysis in a separate function pass manager seem
overly complicated for these tests.

Another difference is that we will get the default aa-pipeline instead
of only running basic-aa. That might be a bit questioned (given that
the tests originally specified basic-aa). The output is however
identival for all the test cases modified here regardless of using
basic-aa or the default aa-pipeline.

This is also another small step towards removal of the support for
using the legacy PM syntax in opt.

Differential Revision: https://reviews.llvm.org/D118340
2022-01-28 13:58:22 +01:00

35 lines
1.0 KiB
LLVM

; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt < %s -passes=newgvn -S | FileCheck %s
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.12.0"
;; Ensure the invoke does not accidentally get deleted as unused, just because the value is not used.
; Function Attrs: norecurse ssp uwtable
define i32 @main() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*){
; CHECK-LABEL: @main(
; CHECK-NEXT: [[TMP1:%.*]] = invoke i32 @foo()
; CHECK-NEXT: to label %good unwind label %bad
; CHECK: good:
; CHECK-NEXT: ret i32 5
; CHECK: bad:
; CHECK-NEXT: [[TMP2:%.*]] = landingpad { i8*, i32
;
%1 = invoke i32 @foo()
to label %good unwind label %bad
good:
; <label>:15: ; preds = %.preheader
ret i32 5
bad:
; <label>:20: ; preds = %15, %.preheader
%2 = landingpad { i8*, i32 }
cleanup
resume { i8*, i32 } %2
}
declare i32 @foo()
declare i32 @__gxx_personality_v0(...)