llvm-project/polly/test/ScopInfo/constant-non-integer-branch-condition.ll
Michael Kruse 5c02808131 [polly] Introduce -polly-print-* passes to replace -analyze.
The `opt -analyze` option only works with the legacy pass manager and might be removed in the future, as explained in llvm.org/PR53733. This patch introduced -polly-print-* passes that print what the pass would print with the `-analyze` option and replaces all uses of `-analyze` in the regression tests.

There are two exceptions: `CodeGen\single_loop_param_less_equal.ll` and `CodeGen\loop_with_condition_nested.ll` use `-analyze on the `-loops` pass which is not part of Polly.

Reviewed By: aeubanks

Differential Revision: https://reviews.llvm.org/D120782
2022-03-14 10:27:15 -05:00

28 lines
885 B
LLVM

; RUN: opt %loadPolly -polly-print-scops -disable-output < %s | FileCheck %s
;
; At some point this caused a problem in the domain generation as we
; assumed any constant branch condition to be valid. However, only constant
; integers are interesting and can be handled.
;
; CHECK: Stmt_entry_split__TO__cleanup
;
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
; Function Attrs: nounwind uwtable
define i32 @main(i32* %A) #0 {
entry:
br label %entry.split
entry.split: ; preds = %entry
br i1 icmp ne (i32 (...)* @test_weak, i32 (...)* null), label %if.then, label %cleanup
if.then: ; preds = %entry.split
store i32 0, i32* %A
br label %cleanup
cleanup: ; preds = %if.then, %entry.split
ret i32 0
}
declare extern_weak i32 @test_weak(...)