[PATCH] D48131: [RISCV] Implement codegen for cmpxchg on RV32I
Tim Northover via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 20 04:52:59 PDT 2018
t.p.northover added inline comments.
================
Comment at: lib/Target/RISCV/RISCVExpandPseudoInsts.cpp:485-489
+ // .loop:
+ // lr.w dest, (addr)
+ // bne dest, cmpval, done
+ // sc.w scratch, newval, (addr)
+ // bnez scratch, loop
----------------
Might be better to keep the loophead/looptail labels? I was a little confused when I saw that what looks at first glance like a linear sequence of 4 instructions went into two different basic blocks.
https://reviews.llvm.org/D48131
More information about the llvm-commits
mailing list