
Fixes invariant memory regressions in future DSE patches. Also add a flag to print<memoryssa> to not ensure optimized uses to test this. Noticeable compile time regression [1], but a future DSE change that depends on this more than makes up for it. [1] https://llvm-compile-time-tracker.com/compare.php?from=9d5466849a770eeab222d5a5890376d3596e8ad6&to=95682dbe11d76a3342870437377216e96b167504&stat=instructions:u Reviewed By: asbirlea Differential Revision: https://reviews.llvm.org/D152859
14 lines
386 B
LLVM
14 lines
386 B
LLVM
; RUN: opt -aa-pipeline=basic-aa,tbaa -passes='print<memoryssa><no-ensure-optimized-uses>' -disable-output < %s 2>&1 | FileCheck %s
|
|
|
|
define i8 @test1_yes(ptr %a, ptr %b) {
|
|
; CHECK: 1 = MemoryDef(liveOnEntry)
|
|
store i8 0, ptr %a, align 1
|
|
; CHECK: MemoryUse(liveOnEntry)
|
|
%y = load i8, ptr %b, align 1, !tbaa !0
|
|
ret i8 %y
|
|
}
|
|
|
|
!0 = !{!1, !1, i64 0, i1 true}
|
|
!1 = !{!"qux", !2}
|
|
!2 = !{}
|