1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S %s | FileCheck %s
4 @glob = internal constant [5 x i8*] 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 ult (i8** getelementptr inbounds ([5 x i8*], [5 x i8*]* @glob, i64 0, i64 0), i8** inttoptr (i64 -40 to i8**))
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 (i8** getelementptr inbounds ([5 x i8*], [5 x i8*]* @glob, i64 0, i64 0), i8** inttoptr (i64 -40 to i8**)), %entry ]