[llvm] [RFC] IR: Support atomicrmw FP ops with vector types (PR #86796)

James Y Knight via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 28 10:20:41 PDT 2024


================
@@ -8222,7 +8222,7 @@ int LLParser::parseAtomicRMW(Instruction *&Inst, PerFunctionState &PFS) {
               " operand must be an integer, floating point, or pointer type");
     }
   } else if (IsFP) {
-    if (!Val->getType()->isFloatingPointTy()) {
+    if (!Val->getType()->isFPOrFPVectorTy()) {
----------------
jyknight wrote:

The atomicrmw IR instruction with a staticly-sized vector arg should be able to work on all architectures (and I believe it does with this patch?). But, a scalable vector will, I believe, crash with an assertion failure on all architectures, because we expect to be able to query the size of the atomic access, and cannot do so for a scalable vector.

We shouldn't start accepting new IR which crashes with assertion failures in the compiler.

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


More information about the llvm-commits mailing list