brintos

brintos / llvm-project-archived public Read only

0
0
Text · 884 B · 3d98b0d Raw
30 lines · plain
1; RUN: opt -passes=jump-threading < %s -S -o - | FileCheck %s2 3; Reproducer for PR47297.4 5; The pass did previously not report a correct Modified status in the case6; where a terminator's condition was successfully constant folded, but there7; were no other transformations done. This was caught by the pass return8; status check that is hidden under EXPENSIVE_CHECKS.9 10; CHECK-LABEL: entry:11; CHECK-NEXT: %.not = icmp eq i32 ptrtoint (ptr @a to i32), 012; CHECK-NEXT: br i1 %.not, label %overflow, label %cont13 14@a = internal global i16 015 16define void @foo(i16 %d) {17entry:18  %.not = icmp eq i32 ptrtoint (ptr @a to i32), 019  br i1 %.not, label %overflow, label %cont20 21overflow:                                         ; preds = %entry22  call void @bar()23  br label %cont24 25cont:                                             ; preds = %overflow, %entry26  ret void27}28 29declare void @bar()30