This is an archive of the discontinued LLVM Phabricator instance.

[InstCombine] Combine (zext a) mul (zext b) to llvm.umul.with.overflow only if mul has NUW flag
ClosedPublic

Authored by StephenFan on Jan 4 2023, 10:47 PM.

Diff Detail

Event Timeline

StephenFan created this revision.Jan 4 2023, 10:47 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 4 2023, 10:47 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
StephenFan requested review of this revision.Jan 4 2023, 10:47 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 4 2023, 10:47 PM
nikic accepted this revision.Jan 5 2023, 1:19 AM

LG

llvm/test/Transforms/InstCombine/overflow-mul.ll
246

nit: Drop nounwind.

280

This commutation test doesn't look useful, because it will be commuted before the transform.

283

Add a variant that actually has the nuw flag? (Not just inferred like in above cases.)

This revision is now accepted and ready to land.Jan 5 2023, 1:19 AM
This revision was landed with ongoing or failed builds.Jan 7 2023, 10:42 PM
This revision was automatically updated to reflect the committed changes.