The default behavior of shouldFormOverflowOp is to only enable
for uaddo.
This patch enables it for consistency. We can work on other fixes to
improve the generated code.
Paths
| Differential D146835
[RISCV] Enable usubo formation in CodeGenPrepare. Changes PlannedPublic Authored by craig.topper on Mar 24 2023, 11:33 AM.
Details
Diff Detail
Unit TestsFailed Event Timeline
craig.topper added a parent revision: D146786: [CodeGenPrepare][RISCV] Correct the MathUsed flag for shouldFormOverflowOp.Mar 24 2023, 11:48 AM craig.topper added inline comments.
This revision is now accepted and ready to land.Mar 24 2023, 1:32 PM Comment Actions I start writing a comment grumbling that this adds undesirably tight coupling between with the implementation details of TargetLowering::shouldFormOverflowOp, but when I got to the end of it figured it wasn't that bad. If the comment had just said "Allow the transform whenever it would be allowed for UADDO" I might not have commented. LGTM. Though an assert like you suggest probably makes sense.
Revision Contents
Diff 508175 llvm/lib/Target/RISCV/RISCVISelLowering.h
llvm/test/CodeGen/RISCV/atomicrmw-uinc-udec-wrap.ll
llvm/test/CodeGen/RISCV/overflow-intrinsics.ll
|
clang-format not found in user’s local PATH; not linting file.