Files
clang-p2996/polly/test/CodeGen/multiple-scops-in-a-row.ll
rahulana-quic e1f056f692 Reland "[polly] Port polly tests to use NPM" (#92918)
Even as the NPM has been in use by Polly for a while now, the majority
of the tests continue using the LPM passes. This patch ports the tests
to use the NPM passes (for example, by replacing a flag such as
-polly-detect with -passes=polly-detect following the NPM syntax for
specifying passes) with some exceptions for some missing features in the
new passes.

Relanding #90632.
2024-05-24 13:09:34 -07:00

52 lines
1.7 KiB
LLVM

; RUN: opt %loadNPMPolly -S -passes=polly-codegen < %s | FileCheck %s
; This test case has two scops in a row. When code generating the first scop,
; the second scop is invalidated. This test case verifies that we do not crash
; due to incorrectly assuming the second scop is still valid.
; We explicitly check here that the second scop is not code generated. Later
; improvements may make this possible (e.g., Polly gaining support for
; parameteric conditional expressions or a changed code generation order).
; However, in case this happens, we want to ensure this test case is been
; reasoned about and updated accordingly.
; CHECK: polly.start:
; CHECK-NOT: polly.start:
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
define void @hoge(ptr %arg) {
bb:
br label %bb1
bb1: ; preds = %bb
%tmp = getelementptr inbounds i8, ptr %arg, i64 5
%tmp2 = getelementptr inbounds i8, ptr %arg, i64 6
br i1 false, label %bb3, label %bb4
bb3: ; preds = %bb1
br label %bb4
bb4: ; preds = %bb3, %bb1
%tmp5 = icmp eq i32 0, 1
br label %bb6
bb6: ; preds = %bb4
br i1 undef, label %bb7, label %bb8
bb7: ; preds = %bb6
unreachable
bb8: ; preds = %bb6
br i1 %tmp5, label %bb9, label %bb10
bb9: ; preds = %bb8
br label %bb11
bb10: ; preds = %bb8
br label %bb11
bb11: ; preds = %bb10, %bb9
ret void
}