[llvm] [RISCV][ISel] Add codegen support for the experimental zabha extension (PR #80192)
James Y Knight via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 9 15:45:13 PST 2024
================
@@ -19662,6 +19673,9 @@ Value *RISCVTargetLowering::emitMaskedAtomicCmpXchgIntrinsic(
Intrinsic::getDeclaration(CI->getModule(), CmpXchgIntrID, Tys);
Value *Result = Builder.CreateCall(
MaskedCmpXchg, {AlignedAddr, CmpVal, NewVal, Mask, Ordering});
+
+ if (Subtarget.hasStdExtZabha())
+ return Builder.CreateTrunc(Result, CI->getCompareOperand()->getType());
----------------
jyknight wrote:
Can also go away.
https://github.com/llvm/llvm-project/pull/80192
More information about the llvm-commits
mailing list