summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp
diff options
context:
space:
mode:
authorArtem Belevich <tra@google.com>2017-11-14 19:14:00 +0000
committerArtem Belevich <tra@google.com>2017-11-14 19:14:00 +0000
commit55dcf5e586a470d13350fcf3b0b85993c73ce024 (patch)
treecfe00c61f0f9bfd22cfa430273a422769562b26f /llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp
parent35d90aea7a476da62be5dde06330e1032bb46f56 (diff)
downloadbcm5719-llvm-55dcf5e586a470d13350fcf3b0b85993c73ce024.tar.gz
bcm5719-llvm-55dcf5e586a470d13350fcf3b0b85993c73ce024.zip
Mark intrinsics operating on the whole warp as IntrInaccessibleMemOnly
It's needed to model the fact that they do access data from other threads in a warp and thus can't be CSE'd. llvm-svn: 318173
Diffstat (limited to 'llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp')
-rw-r--r--llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp b/llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp
index ac4f2544fc3..f141122ec48 100644
--- a/llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp
+++ b/llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp
@@ -3321,6 +3321,16 @@ bool NVPTXTargetLowering::getTgtMemIntrinsic(
switch (Intrinsic) {
default:
return false;
+ case Intrinsic::nvvm_match_all_sync_i32p:
+ case Intrinsic::nvvm_match_all_sync_i64p:
+ Info.opc = ISD::INTRINSIC_W_CHAIN;
+ // memVT is bogus. These intrinsics have IntrInaccessibleMemOnly attribute
+ // in order to model data exchange with other threads, but perform no real
+ // memory accesses.
+ Info.memVT = MVT::i1;
+ Info.readMem = true; // Our result depends on other thread's arguments.
+ Info.writeMem = true; // Other threads depend on our thread's argument.
+ return true;
case Intrinsic::nvvm_wmma_load_a_f16_col:
case Intrinsic::nvvm_wmma_load_a_f16_row:
case Intrinsic::nvvm_wmma_load_a_f16_col_stride:
OpenPOWER on IntegriCloud