This is an archive of the discontinued LLVM Phabricator instance.

[X86] Correct two places that seemed to be mishandling X86ISD::UMUL
ClosedPublic

Authored by craig.topper on Aug 13 2017, 12:33 PM.

Details

Summary

According to the X86ISelLowering.h, UMUL results are low, high, and flags. But one place was treating result 1 as flags, and another place was treating result 1 or 2 as flags.

Diff Detail

Repository
rL LLVM

Event Timeline

craig.topper created this revision.Aug 13 2017, 12:33 PM

I'm actually not sure why any of the "flag" setting instructions are in computeKnownBitsForTargetNode. You can remove them all and no tests fail.

RKSimon added inline comments.Aug 13 2017, 1:22 PM
lib/Target/X86/X86ISelLowering.cpp
26920 ↗(On Diff #110884)

Probably a lot cleaner just to set Known.Zero.setBitsFrom(1); here instead of using goto

Removed the known bits part. I think we should just remove these nodes from known bits. I've done that in D36657

RKSimon accepted this revision.Aug 14 2017, 2:49 AM

LGTM

This revision is now accepted and ready to land.Aug 14 2017, 2:49 AM
This revision was automatically updated to reflect the committed changes.