This is an archive of the discontinued LLVM Phabricator instance.

[X86] Add a memory clobber to the bittest intrinsic inline asm. Get default clobbers from the target
ClosedPublic

Authored by craig.topper on Sep 22 2020, 4:25 PM.

Details

Summary

I believe the inline asm emitted here should have a memory clobber since it writes to memory.

It was also missing the dirflag clobber that we use by default along with flags and fpsr. To avoid missing defaults in the future, get the default list from the target

Diff Detail

Event Timeline

craig.topper requested review of this revision.Sep 22 2020, 4:25 PM
craig.topper created this revision.
RKSimon added inline comments.Sep 23 2020, 2:43 AM
clang/test/CodeGen/bittest-intrin.c
45–50

Can you replace the regex with explicit checks for the clobbers here as well?

Update more check lines to fully check the clobbers

rnk accepted this revision.Sep 23 2020, 11:12 AM

lgtm

This revision is now accepted and ready to land.Sep 23 2020, 11:12 AM
RKSimon accepted this revision.Sep 23 2020, 1:17 PM

LGTM as well cheers

Herald added a project: Restricted Project. · View Herald TranscriptSep 23 2020, 2:55 PM