https://llvm.org/bugs/show_bug.cgi?id=26668
Bug ID: 26668 Summary: Support cmpxchg of pointer type Product: libraries Version: trunk Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: Core LLVM classes Assignee: unassignedb...@nondot.org Reporter: listm...@philipreames.com CC: llvm-bugs@lists.llvm.org Classification: Unclassified Today, we do not allow cmpxchg operations with pointer arguments. We require the frontend to insert ptrtoint casts and do the cmpxchg in integers. While correct, this is problematic from a couple of perspectives: 1) It makes the IR harder to analyse (for instance, it breaks capture tracking) 2) It pushes work onto the frontend authors for no real gain The simplest implementation would be to introduce a lowering rule in AtomicExpand that converts a cmpxchg of pointer type back to the inttoptr type version the backends already understand. Over time, we could migrate each backend to natively selecting the pointer type. -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs