[PATCH] D129238: [GVN] Add test for failing remark assertion
Vir Narula via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 6 16:09:35 PDT 2022
virnarula updated this revision to Diff 442711.
virnarula added a comment.
Add testing
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129238/new/
https://reviews.llvm.org/D129238
Files:
llvm/test/Transforms/GVN/remarks-selfdomination.ll
Index: llvm/test/Transforms/GVN/remarks-selfdomination.ll
===================================================================
--- /dev/null
+++ llvm/test/Transforms/GVN/remarks-selfdomination.ll
@@ -0,0 +1,24 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; RUN: opt -gvn -pass-remarks-analysis=gvn -S < %s | FileCheck %s
+
+target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
+target triple = "arm64-apple-macosx12.0.0"
+
+define ptr @ReplaceWithTidy(ptr %zz_hold) {
+; CHECK-LABEL: @ReplaceWithTidy(
+; CHECK-NEXT: cond.end480.us:
+; CHECK-NEXT: [[TMP0:%.*]] = load ptr, ptr null, align 8
+; CHECK-NEXT: store ptr [[TMP0]], ptr [[TMP0]], align 8
+; CHECK-NEXT: store ptr null, ptr [[ZZ_HOLD:%.*]], align 8
+; CHECK-NEXT: [[TMP1:%.*]] = load ptr, ptr [[TMP0]], align 8
+; CHECK-NEXT: store ptr [[TMP1]], ptr null, align 8
+; CHECK-NEXT: ret ptr null
+;
+cond.end480.us:
+ %0 = load ptr, ptr null, align 8
+ store ptr %0, ptr %0, align 8
+ store ptr null, ptr %zz_hold, align 8
+ %1 = load ptr, ptr %0, align 8
+ store ptr %1, ptr null, align 8
+ ret ptr null
+}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129238.442711.patch
Type: text/x-patch
Size: 1124 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220706/9869fa80/attachment.bin>
More information about the llvm-commits
mailing list