This is an archive of the discontinued LLVM Phabricator instance.

[ARM,MVE] Add missing IntrNoMem flag on IR intrinsics.
ClosedPublic

Authored by simon_tatham on Jan 9 2020, 5:07 AM.

Details

Summary

A lot of the IR-level intrinsics we've been defining for MVE recently
accidentally had props = [] instead of props = [IntrNoMem], so
that optimization would have been overcautious about reordering them.

All the affected cases were due to instantiating the multiclasses
MVEPredicated and MVEMXPredicated without filling in the props
parameter, because I thought I remembered having set the defaults
in those multiclasses to [IntrNoMem]. In fact I hadn't done that.
Now I have.

(The IR intrinsics that do read and write memory are all
explicitly marked as [IntrReadMem] or [IntrWriteMem] already, so
they will override these defaults.)

Event Timeline

simon_tatham created this revision.Jan 9 2020, 5:07 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 9 2020, 5:07 AM

I agree that IntrNoMem makes a very sensible default.

llvm/include/llvm/IR/IntrinsicsARM.td
901

Can we remove it here?

1053

Same Q for this one and the ones below too.

1077–1078

Completely of topic but how come there is a cls intrinsics in the middle of the mve's? Can you move it up to near something similar, whilst you are here.

simon_tatham marked 3 inline comments as done.

Removed the now redundant IntrNoMem, and moved cls up to before the MVE section. The output of llvm-tblgen -print-records on the whole of ARM.td is unchanged by these fixes.

dmgreen accepted this revision.Jan 9 2020, 6:14 AM

Thanks. LGTM.

This revision is now accepted and ready to land.Jan 9 2020, 6:14 AM