[PATCH] D58982: DAG: allow DAG pointer size different from memory representation.
Sanjoy Das via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 8 19:36:52 PDT 2019
sanjoy added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:4711
+
+ SDValue Val = DAG.getPtrExtOrTrunc(getValue(I.getValueOperand()), dl, MemVT);
+ SDValue OutChain = DAG.getAtomic(ISD::ATOMIC_STORE, dl, MemVT, InChain,
----------------
This line crashes when we have an atomic store of a floating point number. Simple reproducer:
```
target datalayout = "e-i64:64-i128:128-v16:16-v32:32-n16:32:64"
target triple = "nvptx64-nvidia-cuda"
define void @f(float %a, float* %b) {
entry:
store atomic float %a, float* %b unordered, align 4
ret void
}
```
I think it needs to bitcast the value operand to an integer before truncating or extending it.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58982/new/
https://reviews.llvm.org/D58982
More information about the llvm-commits
mailing list