1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -codegenprepare -S -mtriple=x86_64-linux < %s | FileCheck %s
4 define i32 @test1(i8* %d) nounwind {
7 ; CHECK-NEXT: [[L:%.*]] = load i8, i8* [[D:%.*]], align 1
8 ; CHECK-NEXT: [[TMP0:%.*]] = icmp eq i8 [[L]], 0
9 ; CHECK-NEXT: [[CONV:%.*]] = zext i1 [[TMP0]] to i32
10 ; CHECK-NEXT: ret i32 [[CONV]]
14 %cmp = icmp eq i8 %l, 0
15 br i1 %cmp, label %exit, label %if.end
18 %gep = getelementptr i8, i8* %d, i32 42
19 %call = call i64 @foo(i8* %gep) nounwind readonly willreturn
20 %cmp2 = icmp ne i64 %call, 0
21 call void @llvm.assume(i1 %cmp2)
25 %conv = zext i1 %cmp to i32
29 declare i64 @foo(i8*) nounwind readonly willreturn
30 declare void @llvm.assume(i1 noundef) nounwind willreturn