Is there a reason that we don't have a definition for write-only
intrinsics? Specifically, utils/TableGen/CodeGenIntrinsics.h contains:
// Memory mod/ref behavior of this intrinsic.
enum {
NoMem, ReadArgMem, ReadMem, ReadWriteArgMem, ReadWriteMem
} ModRef;
The problem with this seems to be that "store" instructions, like the
PPC STVX instruction, that are primarily defined by an intrinsic
(int_ppc_altivec_stvx for the STVX instruction) get tagged as
"mayLoad"
even though they don't load anything. This is because the default
mod/ref tag for intrinsics is, for safely, ReadWriteMem, and TableGen
makes use of the intrinsics' mod/ref info when it is available. In the
current setup, int_ppc_altivec_stvx needs to take the ReadWriteMem tag
because there is no other that can indicate writing.
If there is no particular reason for the current behavior, then I'll
propose a patch to add a WriteMem tag for intrinsics.
Thanks again,
Hal
--
Hal Finkel
Postdoctoral Appointee
Leadership Computing Facility
Argonne National Laboratory