This is an archive of the discontinued LLVM Phabricator instance.

[X86] Add ReadAfterLds to some 3 src instructions
ClosedPublic

Authored by craig.topper on Mar 20 2018, 9:39 PM.

Details

Summary

I think we're supposed to have a ReadAfterLd for each operand that's read after load?

Sometimes the operand comes after the memory operand so we need 5 ReadDefaults first.

I suspect we also need to do something for the mask operand for masked avx512 instructions? I'm not sure if the mask should be ReadAfterLd or not since it can mask faults. If it shouldn't be ReadAfterLd then we're probably wrong for zero masking instructions already.

Diff Detail

Event Timeline

craig.topper created this revision.Mar 20 2018, 9:39 PM

@andreadb does this one look ok? Ignoring that the InstRWs in the scheduler models drop the ReadAdvances anyway.

andreadb accepted this revision.Mar 29 2018, 2:20 PM

It looks good to me.

Unfortunately I cannot test it now (I am not at work..). Would it be possible to add a couple of simple llvm-mca tests (maybe one for a 3 operands FMA and one for a FMA4 instruction)?
Something that runs for a single iteration and prints the timeline view would be nice (you can commit those tests later if you prefer).

Thanks,
Andrea

This revision is now accepted and ready to land.Mar 29 2018, 2:20 PM

@andreadb does this one look ok? Ignoring that the InstRWs in the scheduler models drop the ReadAdvances anyway.

Ah, forget about the tests then...
I mean, you can still add them to show the problem.

This revision was automatically updated to reflect the committed changes.