[PATCH] D144942: [Local][InstCombine] Handle MD_noundef in combineMetadataCSE
luxufan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 28 02:09:59 PST 2023
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG207854b07dd9: [Local][InstCombine] Handle MD_noundef in combineMetadataCSE (authored by StephenFan).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144942/new/
https://reviews.llvm.org/D144942
Files:
llvm/lib/Transforms/Utils/Local.cpp
llvm/test/Transforms/InstCombine/load-combine-metadata.ll
Index: llvm/test/Transforms/InstCombine/load-combine-metadata.ll
===================================================================
--- llvm/test/Transforms/InstCombine/load-combine-metadata.ll
+++ llvm/test/Transforms/InstCombine/load-combine-metadata.ll
@@ -7,11 +7,12 @@
; CHECK: %[[V:.*]] = load i32, ptr %0
; CHECK-SAME: !tbaa !{{[0-9]+}}
; CHECK-SAME: !range ![[RANGE:[0-9]+]]
+; CHECK-SAME: !noundef !{{[0-9]+}}
; CHECK: store i32 %[[V]], ptr %1
; CHECK: store i32 %[[V]], ptr %2
define void @test_load_load_combine_metadata(ptr, ptr, ptr) {
- %a = load i32, ptr %0, !tbaa !8, !range !0, !alias.scope !5, !noalias !6
- %b = load i32, ptr %0, !tbaa !8, !range !1
+ %a = load i32, ptr %0, !tbaa !8, !range !0, !noundef !10, !alias.scope !5, !noalias !6
+ %b = load i32, ptr %0, !tbaa !8, !range !1, !noundef !10
store i32 %a, ptr %1
store i32 %b, ptr %2
ret void
@@ -28,3 +29,4 @@
!7 = !{ !"tbaa root" }
!8 = !{ !9, !9, i64 0 }
!9 = !{ !"scalar type", !7}
+!10 = !{}
Index: llvm/lib/Transforms/Utils/Local.cpp
===================================================================
--- llvm/lib/Transforms/Utils/Local.cpp
+++ llvm/lib/Transforms/Utils/Local.cpp
@@ -2751,7 +2751,7 @@
LLVMContext::MD_dereferenceable,
LLVMContext::MD_dereferenceable_or_null,
LLVMContext::MD_access_group, LLVMContext::MD_preserve_access_index,
- LLVMContext::MD_nontemporal};
+ LLVMContext::MD_nontemporal, LLVMContext::MD_noundef};
combineMetadata(K, J, KnownIDs, KDominatesJ);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D144942.501056.patch
Type: text/x-patch
Size: 1532 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230228/0236cc24/attachment.bin>
More information about the llvm-commits
mailing list