1 ; RUN: opt -aa-pipeline=basic-aa -passes='print<memoryssa>,verify<memoryssa>' -disable-output < %s 2>&1 | FileCheck %s
3 ; Ensures that MemorySSA leverages the ground truth of the function being called when wrapped in a bitcast.
5 declare i1 @opaque_true(i1) nounwind readonly
7 define i1 @foo(i32* %ptr, i1 %cond) {
8 %cond_wide = zext i1 %cond to i32
9 ; CHECK: MemoryUse(liveOnEntry) MayAlias
10 ; CHECK-NEXT: call i32 bitcast
11 %cond_hidden_wide = call i32 bitcast (i1 (i1)* @opaque_true to i32 (i32)*)(i32 %cond_wide)
12 %cond_hidden = trunc i32 %cond_hidden_wide to i1