1; RUN: opt -passes=jump-threading < %s -S -o - | FileCheck %s 2 3; Reproducer for PR47297. 4 5; The pass did previously not report a correct Modified status in the case 6; where a terminator's condition was successfully constant folded, but there 7; were no other transformations done. This was caught by the pass return 8; 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), 0 12; CHECK-NEXT: br i1 %.not, label %overflow, label %cont 13 14@a = internal global i16 0 15 16define void @foo(i16 %d) { 17entry: 18 %.not = icmp eq i32 ptrtoint (ptr @a to i32), 0 19 br i1 %.not, label %overflow, label %cont 20 21overflow: ; preds = %entry 22 call void @bar() 23 br label %cont 24 25cont: ; preds = %overflow, %entry 26 ret void 27} 28 29declare void @bar() 30