This is an archive of the discontinued LLVM Phabricator instance.

[DAGCombiner] Allow divide by constant optimization on opaque constants.
ClosedPublic

Authored by craig.topper on Aug 17 2018, 9:49 PM.

Diff Detail

Event Timeline

craig.topper created this revision.Aug 17 2018, 9:49 PM

Nice! I like it when the fix is simple.

test/CodeGen/X86/divide-by-constant.ll
334

If you add nounwind to this, the asm will get a lot less verbose while still showing the relevant bits.

chandlerc accepted this revision.Aug 17 2018, 10:05 PM

This time actually marking it as LGTM.

This revision is now accepted and ready to land.Aug 17 2018, 10:05 PM
xbolva00 added inline comments.
test/CodeGen/X86/divide-by-constant.ll
404

another test for sdiv?

This revision was automatically updated to reflect the committed changes.