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.
Differential D146835
[RISCV] Enable usubo formation in CodeGenPrepare. craig.topper on Mar 24 2023, 11:33 AM. Authored by
Details
Diff Detail
Event Timeline
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.
|