I am puzzled by this assertion. The PLDI'17 paper proposed that, but you specifically talk about LLVM in the present tense, and I quoted the part of the language reference which says otherwise. I could be persuaded that this clause does not apply to
write specifically (e.g., maybe you want to argue an opaque call to
write does not depend on the bytes in the buffer), but it seems plain as day to me that there is UB from poison beyond branching/selecting on it. For example,
store volatile i8, i8* %p, poison is UB since:
- "Values other than phi nodes depend on their operands", so the store instruction depends on poison.
- Volatile accesses have side effects.
- As quoted before, "undefined behavior occurs if a side effect depends on poison"