1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -S -passes=instcombine < %s | FileCheck %s
4 ; This does not reach a fixpoint, because the global initializer is not in
5 ; folded form. This will not happen if preceded by a GlobalOpt run.
7 target datalayout = "p:8:8"
9 @g = external global i8
10 @c = constant ptr getelementptr inbounds (i8, ptr @g, i64 1)
12 define i1 @test(ptr %p) "instcombine-no-verify-fixpoint" {
14 ; CHECK-NEXT: [[CMP:%.*]] = icmp eq ptr [[P:%.*]], getelementptr inbounds (i8, ptr @g, i64 1)
15 ; CHECK-NEXT: ret i1 [[CMP]]
18 call void @llvm.memcpy.p0.p0.i32(ptr %alloca, ptr @c, i32 0, i1 false)
19 %load = load ptr, ptr %alloca
20 %cmp = icmp eq ptr %p, %load
24 declare void @llvm.memcpy.p0.p0.i32(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i32, i1 immarg)