[llvm] [RISCV][ISel] Add codegen support for the experimental zabha extension (PR #80192)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 31 21:22:27 PST 2024
================
@@ -629,7 +629,10 @@ RISCVTargetLowering::RISCVTargetLowering(const TargetMachine &TM,
if (Subtarget.hasStdExtA()) {
setMaxAtomicSizeInBitsSupported(Subtarget.getXLen());
- setMinCmpXchgSizeInBits(32);
+ if (Subtarget.hasStdExtZabha())
+ setMinCmpXchgSizeInBits(8);
----------------
dtcxzyw wrote:
Without this change, I cannot emit `amoxor.b/amoand.b/amoor.b` since AtomicExpand pass always widen them to 32-bit:
https://github.com/llvm/llvm-project/blob/995d21bc6ff2220b2887cf9640d936eb99b3c617/llvm/lib/CodeGen/AtomicExpandPass.cpp#L325-L333
Do you have any idea on how to fix it?
https://github.com/llvm/llvm-project/pull/80192
More information about the llvm-commits
mailing list