[PATCH] D76127: [TableGen] Do not set ReadOnly attribute on intrinsics with side effects

TOCK Chiu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 13 05:46:17 PDT 2020


TOCK created this revision.
TOCK added a reviewer: stoklund.
TOCK created this object with visibility "All Users".
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

If an intrinsic with side effects is called twice using the same set of
arguments, EarlyCSE would happily remove the second call because it has
`ReadOnly` attribute. Similar to 52c39396151978ca946e2a80d9118c8672bace14,
this patch makes TableGen not set `Attribute::ReadOnly` for intrinsics
which are declared with `IntrHasSideEffects`.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D76127

Files:
  llvm/test/TableGen/intrin-side-effects.td
  llvm/utils/TableGen/IntrinsicEmitter.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76127.250182.patch
Type: text/x-patch
Size: 3668 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200313/77e9e638/attachment.bin>


More information about the llvm-commits mailing list