[PATCH] D58982: DAG: allow DAG pointer size different from memory representation.
Tim Northover via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 9 02:47:25 PDT 2019
t.p.northover marked an inline comment as done.
t.p.northover 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,
----------------
sanjoy wrote:
> 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.
Sorry about that. I've put up a review to fix it in https://reviews.llvm.org/D61721 (the types are only different for pointers, so no need to add any extra casts).
I think it's pretty trivial, but just wanted to make sure I wasn't breaking some NVPTX testing rules or anything.
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