[all-commits] [llvm/llvm-project] c2e403: GlobalISel: Don't fail translate on weak cmpxchg
Matt Arsenault via All-commits
all-commits at lists.llvm.org
Fri Jun 26 14:52:35 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: c2e403c19d40524f868d7803b104224ca4978597
https://github.com/llvm/llvm-project/commit/c2e403c19d40524f868d7803b104224ca4978597
Author: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: 2020-06-26 (Fri, 26 Jun 2020)
Changed paths:
M llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
M llvm/test/CodeGen/AArch64/GlobalISel/arm64-irtranslator.ll
Log Message:
-----------
GlobalISel: Don't fail translate on weak cmpxchg
The translation of cmpxchg added by
9481399c0fd2c198c81b92636c0dcff7d4c41df2 specifically skipped weak
cmpxchg due to not understanding the meaning. Weak cmpxchg was added
in 420a216817def01816186910a2e35885c9201951. As explained in the
commit message, the weak mode is implicit in how
ATOMIC_CMP_SWAP_WITH_SUCCESS is lowered. If it's expanded to a regular
ATOMIC_CMP_SWAP, it's replaced with a strong cmpxchg.
This handling seems weird to me, but this was already following the
DAG behavior. I would expect the strong IR instruction to not have the
boolean output. Failing that, I might expect the IRTranslator to emit
ATOMIC_CMP_SWAP and a constant for the boolean.
More information about the All-commits
mailing list