HomePhabricator

[SelectionDAG] Strengthen assertions about usage of AtomicSDNodes

Description

[SelectionDAG] Strengthen assertions about usage of AtomicSDNodes

In D57601, I described the expectations around usage of AtomicSDNode and LoadSDNode/StoreSDNode w.r.t. atomic and volatiles. This patch simply embeds those expectations in assertions so that they can't be accidentally weakened.

Note: The reason only AtomicSDNodes of ATOMIC_LOAD and ATOMIC_STORE opcode are currently checked is that AMDGPU has an intrinsic which gets lowered to an ATOMIC_LOAD_FADD w/o a corresponding atomic MMO. This is suspicious, and I've brought it to the attention of the relevant developers. Once resolved, I'll strengthen that assertion.

Note 2: If this breaks your out-of-tree backend, go read the update instructions associated w/the previously mentioned patch. This will assert on (a subset of) things you need to update per those instructions.

Differential Revision: https://reviews.llvm.org/D58738

Details

Committed
reamesFeb 27 2019, 8:07 PM
Differential Revision
D58738: [SelectionDAG] Strengthen assertions about usage of AtomicSDNodes
Parents
rL355068: Fix IR/Analysis layering issue with OptBisect
Branches
Unknown
Tags
Unknown