[PATCH] D144472: [InstCombine][debuginfo] Update valueCoversEntireFragment for fixed size fragment and scalable value.

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 23 01:01:15 PST 2023


sdesmalen added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/Local.cpp:1498-1499
+  if (std::optional<uint64_t> FragmentSize = DII->getFragmentSizeInBits())
+    return !ValueSize.isScalable() &&
+           ValueSize.getFixedValue() >= *FragmentSize;
+
----------------
I'm not sure how `valueCoversEntireFragment` is used, but would it make more sense to write: 

  return TypeSize::isKnownGE(ValueSize, TypeSize::getFixed(*FragmentSize)

?


================
Comment at: llvm/test/Transforms/InstCombine/dbg-scalable-store-fixed-frag.ll:1
+; RUN: opt < %s -passes='instcombine' -S
+
----------------
fakepaper56 wrote:
> sdesmalen wrote:
> > There are no CHECK-lines and the running opt on this file doesn't cause an assertion failure for me. What is this test supposed to verify?
> Sorry that I update the test. It should fail by assertion. 
Thanks, I can confirm the test now fails for me.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D144472



More information about the llvm-commits mailing list