[PATCH] D48131: [RISCV] Implement codegen for cmpxchg on RV32I

Tim Northover via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 14 06:22:19 PDT 2018


t.p.northover added inline comments.


================
Comment at: lib/Target/RISCV/RISCVISelLowering.cpp:1744
+  Value *Addr = CI->getPointerOperand();
+  Value *AddrInt = Builder.CreatePtrToInt(Addr, Builder.getInt32Ty());
+  Value *AlignedAddr = Builder.CreateIntToPtr(
----------------
asb wrote:
> t.p.northover wrote:
> > Is this an intentional choice not to support 64-bit pointers? Even if so, an assert might be good.
> RV64I isn't upstreamed yet. Most other parts of the atomics handling have asserts, and I should definitely add one here. I could try and have it do the right thing, but I think asserting is better than committing code that hasn't been tested. Good catch, thanks.
Sounds good to me. A quick grep gave a handful of riscv64 uses so I wasn't entirely sure.


https://reviews.llvm.org/D48131





More information about the llvm-commits mailing list