[PATCH] D67802: [SelectionDAG][Mips][Sparc] Don't allow SimplifyDemandedBits to constant fold TargetConstant nodes to a Constant.

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 20 09:27:05 PDT 2019


arsenm added inline comments.


================
Comment at: llvm/lib/Target/Mips/MipsSEISelLowering.cpp:2302-2303
+  // Convert from TargetConstant to Constant.
+  SDValue Offset = DAG.getConstant(Op.getConstantOperandAPInt(3), DL,
+                                   Op.getOperand(3).getValueType());
+
----------------
craig.topper wrote:
> arsenm wrote:
> > arsenm wrote:
> > > arsenm wrote:
> > > > This one looks like it's using immarg for an intrinsic argument where it really shouldn't be immarg
> > > I fixed another such case in r356085; this looks like another intrinsic that ends up lowered to generic DAG opcodes so it doesn't really have the restriction
> > r366328 rather
> Should we remove the I from the builtin declaration in the frontend too?
I would probably just remove the intrinsic and emit the plain IR for compatibility. I don't see the point of having intrinsics that lower to generic operations


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D67802





More information about the llvm-commits mailing list