[PATCH] D92999: [amdgpu] Enhance load widening in the constant address space.

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 14 15:08:58 PST 2020


arsenm added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/SIISelLowering.cpp:7981-7983
+    // Skip pseudo source value.
+    if (!P)
+      return SDValue();
----------------
PseudoSourceValues can be permissible. However the first situations I think of at the top of my head are all cases where we would have emitted the correct code in the first place


================
Comment at: llvm/lib/Target/AMDGPU/SIISelLowering.cpp:7985-7986
+    int64_t Offset = 0;
+    const Value *Base =
+        GetPointerBaseWithConstantOffset(P, Offset, DAG.getDataLayout());
+    KnownBits Known = computeKnownBits(Base, DAG.getDataLayout());
----------------
I'm not 100% comfortable relying on the IR value here. Can you just use the DAG known bits?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D92999



More information about the llvm-commits mailing list