[PATCH] D116886: [M68k] Instruction selection to choose neg x when mul x -1 (Fix issue 48588)
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 9 14:41:17 PST 2022
RKSimon added inline comments.
================
Comment at: llvm/lib/Target/M68k/M68kISelDAGToDAG.cpp:326
+ case ISD::SUB: {
+ SDNode *Dividend = U->getOperand(0).getNode();
+ if (ConstantSDNode *CSDN = dyn_cast<ConstantSDNode>(Dividend))
----------------
Any reason why you can't just use llvm::isNullConstant(U->getOperand(0)) ?
================
Comment at: llvm/test/CodeGen/M68k/Arith/imul-neg.ll:4
define i32 @mul4294967295_32(i32 %A) {
; CHECK-LABEL: mul4294967295_32:
----------------
Should we have i16/i8 test coverage as well?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116886/new/
https://reviews.llvm.org/D116886
More information about the llvm-commits
mailing list