FAdd and FSub have recently (r351850) been added as atomicrmw
operations. This diff adds lowering cases for them to the LowerAtomic
transform.
Details
Diff Detail
- Repository
- rL LLVM
- Build Status
Buildable 30527 Build 30526: arc lint + arc unit
Event Timeline
Apparently we have both lib/CodeGEn/AtomicExpandPass.cpp, and lib/Transforms/Scalar/LowerAtomic.cpp. It's unclear to me what the difference is, or why both exist
My understanding (which shouldn't be taken to imply much) is that lib/Transforms/Scalar/LowerAtomic.cpp is for contexts where atomic semantics is known to be unnecessary due to e.g. executing only in a sequential context.
This still needs tests, but it seems this duplicate pass thing could use some work. Both passes have essentially the same switch to turn the atomic into the equivalent non-atomic. It seems to be me like AtomicExpandPass is a superset of LowerAtomic, except AtomicExpand seems to ignore fences
I see what you mean about the redundancy between the LowerAtomic and AtomicExpand passes.
Are the added tests what you had in mind?