// adding them to a worklist. Bail when we run into a memory def that
// does not match LoadAccess.
SetVector<MemoryAccess *> ToCheck;
- MemoryAccess *Current = Def->getDefiningAccess();
+ MemoryAccess *Current =
+ MSSA.getWalker()->getClobberingMemoryAccess(Def);
// We don't want to bail when we run into the store memory def. But,
// the phi access may point to it. So, pretend like we've already
// checked it.
define void @test_load_volatile(i32* %Q) {
; CHECK-LABEL: @test_load_volatile(
; CHECK-NEXT: [[A:%.*]] = load volatile i32, i32* [[Q:%.*]], align 4
-; CHECK-NEXT: store i32 [[A]], i32* [[Q]], align 4
; CHECK-NEXT: ret void
;
%a = load volatile i32, i32* %Q
define void @test_noalias_store_between_load_and_store(i32* noalias %x, i32* noalias %y) {
; CHECK-LABEL: @test_noalias_store_between_load_and_store(
; CHECK-NEXT: entry:
-; CHECK-NEXT: [[LV:%.*]] = load i32, i32* [[X:%.*]], align 4
; CHECK-NEXT: store i32 0, i32* [[Y:%.*]], align 4
-; CHECK-NEXT: store i32 [[LV]], i32* [[X]], align 4
; CHECK-NEXT: ret void
;
entry: