[PATCH] D155307: [InstCombine] Allow KnownBits to be propagated

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 14 09:31:10 PDT 2023


nikic added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp:925
+          if (DemandedMaskLHS.isSubsetOf(LHSKnown.Zero | LHSKnown.One))
             replaceOperand(*I, 0, Constant::getIntegerValue(VTy, LHSKnown.One));
 
----------------
You still need to return here. I think the only thing that needs to change is the incorrect re-declaration of the LHSKnown / RHSKnown variables.


================
Comment at: llvm/test/Transforms/InstCombine/2023-07-13-arm-infiniteloop.ll:4
+target datalayout = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"
+target triple = "armv4t-unknown-linux-gnueabi"
+
----------------
Don't specify data layout or triple.


================
Comment at: llvm/test/Transforms/InstCombine/2023-07-13-arm-infiniteloop.ll:62
+  ret void
+}
+
----------------
Please minimize the test -- I don't see how this second function could possibly be related for example.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D155307



More information about the llvm-commits mailing list