[PATCH] D127609: [AtomicExpand] Make floating point conversion happens before fence insertion
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 13 17:06:14 PDT 2022
arsenm added inline comments.
================
Comment at: llvm/lib/CodeGen/AtomicExpandPass.cpp:229
+ I = LI = convertAtomicLoadToIntegerType(LI);
+ assert(LI->getType()->isIntegerTy() && "invariant broken");
+ MadeChange = true;
----------------
Don't see much point in this assert (plus the others)
================
Comment at: llvm/lib/CodeGen/AtomicExpandPass.cpp:253-254
+ // extend convertCmpXchgToInteger for floating point too.
+ assert(!CASI->getCompareOperand()->getType()->isFloatingPointTy() &&
+ "unimplemented - floating point not legal at IR level");
+ if (CASI->getCompareOperand()->getType()->isPointerTy()) {
----------------
There's no reason to assert on things that fail the verifier
================
Comment at: llvm/test/CodeGen/PowerPC/cfence-double.ll:8
define void @foo() {
+; CHECK-LABEL: foo:
+; CHECK: # %bb.0: # %entry
----------------
Should have an IR test in test/Transforms/AtomicExpand too
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127609/new/
https://reviews.llvm.org/D127609
More information about the llvm-commits
mailing list