[llvm] [RISCV][ISel] Add codegen support for the experimental zabha extension (PR #80192)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 31 15:39:18 PST 2024


================
@@ -629,7 +629,10 @@ RISCVTargetLowering::RISCVTargetLowering(const TargetMachine &TM,
 
   if (Subtarget.hasStdExtA()) {
     setMaxAtomicSizeInBitsSupported(Subtarget.getXLen());
-    setMinCmpXchgSizeInBits(32);
+    if (Subtarget.hasStdExtZabha())
+      setMinCmpXchgSizeInBits(8);
----------------
topperc wrote:

Is this accurate? We would need LR/SC for bytes and half words, or Zacas to be able to cmpxchg on 8 bits.

https://github.com/llvm/llvm-project/pull/80192


More information about the llvm-commits mailing list