1 ; RUN: opt -passes=jump-threading < %s -S -o - | FileCheck %s
3 ; Reproducer for PR47297.
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.
11 ; CHECK-NEXT: br i1 icmp eq (i32 ptrtoint (ptr @a to i32), i32 0), label %overflow, label %cont
13 @a = internal global i16 0
15 define void @foo(i16 %d) {
17 %.not = icmp eq i16 zext (i1 icmp ne (i32 ptrtoint (ptr @a to i32), i32 0) to i16), 0
18 br i1 %.not, label %overflow, label %cont
20 overflow: ; preds = %entry
24 cont: ; preds = %overflow, %entry