[llvm] a67a21b - [EarlyCSE] Add additional metadata preservation test (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Tue May 2 03:52:05 PDT 2023
Author: Nikita Popov
Date: 2023-05-02T12:51:55+02:00
New Revision: a67a21bf41dadaea1ccd29775d376b459a378120
URL: https://github.com/llvm/llvm-project/commit/a67a21bf41dadaea1ccd29775d376b459a378120
DIFF: https://github.com/llvm/llvm-project/commit/a67a21bf41dadaea1ccd29775d376b459a378120.diff
LOG: [EarlyCSE] Add additional metadata preservation test (NFC)
Added:
Modified:
llvm/test/Transforms/EarlyCSE/flags.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/EarlyCSE/flags.ll b/llvm/test/Transforms/EarlyCSE/flags.ll
index 57ea0866d07ac..371fc26dac80c 100644
--- a/llvm/test/Transforms/EarlyCSE/flags.ll
+++ b/llvm/test/Transforms/EarlyCSE/flags.ll
@@ -90,3 +90,15 @@ define void @load_first_nonnull_noundef(ptr %p) {
call void @use.ptr(ptr %v2)
ret void
}
+
+define ptr @store_to_load_forward(ptr %p, ptr %p2) {
+; CHECK-LABEL: @store_to_load_forward(
+; CHECK-NEXT: [[P3:%.*]] = load ptr, ptr [[P:%.*]], align 8
+; CHECK-NEXT: store ptr [[P3]], ptr [[P2:%.*]], align 8
+; CHECK-NEXT: ret ptr [[P3]]
+;
+ %p3 = load ptr, ptr %p, !nonnull !{}
+ store ptr %p3, ptr %p2
+ %res = load ptr, ptr %p2
+ ret ptr %res
+}
More information about the llvm-commits
mailing list