1; RUN: opt -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: br i1 icmp eq (i32 ptrtoint (i16* @a to i32), i32 0), label %overflow, label %cont 12 13@a = internal global i16 0 14 15define void @foo(i16 %d) { 16entry: 17 %.not = icmp eq i16 zext (i1 icmp ne (i32 ptrtoint (i16* @a to i32), i32 0) to i16), 0 18 br i1 %.not, label %overflow, label %cont 19 20overflow: ; preds = %entry 21 call void @bar() 22 br label %cont 23 24cont: ; preds = %overflow, %entry 25 ret void 26} 27 28declare void @bar() 29