1 ; XFAIL: * 2 ; RUN: opt -basicaa -print-memoryssa -verify-memoryssa -analyze < %s 2>&1 | FileCheck %s 3 ; RUN: opt -aa-pipeline=basic-aa -passes='print<memoryssa>' -verify-memoryssa -disable-output < %s 2>&1 | FileCheck %s 4 ; 5 ; Invariant loads should be considered live on entry, because, once the 6 ; location is known to be dereferenceable, the value can never change. 7 ; 8 ; Currently XFAILed because this optimization was held back from the initial 9 ; commit. 10 11 @g = external global i32 12 13 declare void @clobberAllTheThings() 14 15 define i32 @foo() { 16 ; CHECK: 1 = MemoryDef(liveOnEntry) 17 ; CHECK-NEXT: call void @clobberAllTheThings() 18 call void @clobberAllTheThings() 19 ; CHECK: MemoryUse(liveOnEntry) 20 ; CHECK-NEXT: %1 = load i32 21 %1 = load i32, i32* @g, align 4, !invariant.load !0 22 ret i32 %1 23 } 24 25 !0 = !{} 26