This makes use of the code in D114013 to fold away unnecessary CMPZ/CSINC starting from a CMOV, in a similar way to how we fold away CSINV/CSINC/etc
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/ARM/ARMISelLowering.cpp | ||
---|---|---|
18036–18047 | There's a decent amount of duplication here. Would it be neater to do something like: code = -1 if (N->getConstantOperandVal(2) == EQ) code = getTargetConstant(...) else if (N->getConstantOperandVal(2) == NE) code = getOppositeCondition(...) if (code != -1) return DAG.getNode(,,,) ? |
Comment Actions
Thanks for the suggestion. Rejigged the code to only have a single DAG.getNode(..) call.
There's a decent amount of duplication here. Would it be neater to do something like:
?