[PATCH] D129235: [GVN] Bug fix to reportMayClobberedLoad remark

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 6 16:35:01 PDT 2022


fhahn added a comment.

Thanks for the update! It looks like the changes in GVN.cpp got dropped though



================
Comment at: llvm/test/Transforms/GVN/remarks-selfdomination.ll:5
+target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
+target triple = "arm64-apple-macosx12.0.0"
+
----------------
this is not needed


================
Comment at: llvm/test/Transforms/GVN/remarks-selfdomination.ll:17
+;
+cond.end480.us:
+  %0 = load ptr, ptr null, align 8
----------------
Could you updatee the name here to `entry` or something similar?


================
Comment at: llvm/test/Transforms/GVN/remarks-selfdomination.ll:18
+cond.end480.us:
+  %0 = load ptr, ptr null, align 8
+  store ptr %0, ptr %0, align 8
----------------
load from `null` is UB in LLVM IR. Could you instead add a `ptr` argument to the function and use it instead of `null`? Same for the store. It might be good to simplify the name of `zz_hold` as well.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D129235/new/

https://reviews.llvm.org/D129235



More information about the llvm-commits mailing list