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

Jessica Clarke via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 31 22:10:50 PST 2024


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

That came from https://github.com/llvm/llvm-project/commit/3291f9aa8168408ce5ef4757012c06c196a72c41, which seems slightly odd. Seems to be assuming shouldExpandAtomicRMWInIR doesn't return None, which it probably should be checking?

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


More information about the llvm-commits mailing list