1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -passes=simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S %s | FileCheck %s
4 @glob = internal constant [5 x ptr] zeroinitializer, align 16
6 ; Make sure simplifycfg does not crash when dealing with icmp constant
8 define i1 @test(i1 %c) {
11 ; CHECK-NEXT: [[SPEC_SELECT:%.*]] = select i1 [[C:%.*]], i1 false, i1 icmp ugt (ptr inttoptr (i64 -40 to ptr), ptr @glob)
12 ; CHECK-NEXT: ret i1 [[SPEC_SELECT]]
15 br i1 %c, label %if.then, label %exit
21 %p = phi i1 [ false, %if.then ], [ icmp ult (ptr @glob, ptr inttoptr (i64 -40 to ptr)), %entry ]