[PATCH] D142122: [SVE][InstrFormats] Explcitly set hasSideEffects for all SVE instructions.

Paul Walker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 19 08:04:07 PST 2023


paulwalker-arm created this revision.
Herald added subscribers: ctetreau, psnobl, gbedwell, hiraditya, tschuett.
Herald added a reviewer: andreadb.
Herald added a reviewer: efriedma.
Herald added a project: All.
paulwalker-arm requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

The instruction property hasSideEffects relies on the presence of
tablegen isel patterns when constructing its value, unless
specifically overriden. Since adding SVE scheduling information
we've noticed this property flip-flop as isel patterns have been
updated. To make things consistent (and correct) this patch
explicitly sets the property for all SVE instructions.

This has resulted in the following notable changes:

- Normal load and store instructions no longer report having side effects.
- All prefetch instructions correctly report having side effects.
- FFR related instructions continue to report having side effects. This is likely overkill but I've chosen to remain cautious here.
- Most all integer instructions no longer report having side effects.
- Most all floating point instructions no longer report having side effects, but do now report their potential for raising FP exceptions. I do not know how to test the latter so I've again took a caution route of taging all floating point instructions except for DUPs.
- The conflict detection intrinsics now report they don't touch memory.

NOTE: SVE isel makes significant use of psuedo instructions but
this patch makes no effort to update them.



NOTE: We'll need a similar patch for SME but without a scheduling
model it'll be harder to verify the results.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D142122

Files:
  llvm/include/llvm/IR/IntrinsicsAArch64.td
  llvm/lib/Target/AArch64/SVEInstrFormats.td
  llvm/test/CodeGen/AArch64/sve-fixed-length-fp128.ll
  llvm/test/CodeGen/AArch64/sve-insert-vector.ll
  llvm/test/tools/llvm-mca/AArch64/A64FX/A64FX-sve-instructions.s
  llvm/test/tools/llvm-mca/AArch64/Neoverse/N2-sve-instructions.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142122.490521.patch
Type: text/x-patch
Size: 250266 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230119/e662513c/attachment-0001.bin>


More information about the llvm-commits mailing list