brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · 4d28065 Raw
31 lines · plain
1;RUN: opt -verify-dom-info -passes='loop-simplify,require<postdomtree>,require<opt-remark-emit>,loop-mssa(licm),function(adce)' -S -o - %s | FileCheck %s2 3target triple = "x86_64-unknown-linux-gnu"4 5@c = external global i16, align 16 7;Make sure this test do not crash while accessing PostDomTree which is not8;preserved in LICM.9;10;CHECK-LABEL: fn1(i1 %arg)11;CHECK-LABEL: for.cond.loopexit.split.loop.exit12;CHECK-LABEL: for.cond.loopexit.split.loop.exit113define void @fn1(i1 %arg) {14entry:15  br label %for.cond16 17for.cond:                                         ; preds = %if.end, %for.cond1, %entry18  %0 = phi i16 [ undef, %entry ], [ ptrtoint (ptr @c to i16), %if.end ], [ %.mux, %for.cond1 ]19  br i1 %arg, label %for.cond1, label %for.end820 21for.cond1:                                        ; preds = %if.end, %for.cond22  %.mux = select i1 undef, i16 undef, i16 ptrtoint (ptr @c to i16)23  br i1 %arg, label %for.cond, label %if.end24 25if.end:                                           ; preds = %for.cond126  br i1 %arg, label %for.cond, label %for.cond127 28for.end8:                                         ; preds = %for.cond29  ret void30}31