[llvm] 014446c - GlobalISel: Remove faulty assert in buildAtomicRMW op

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 9 13:29:40 PDT 2024


Author: Matt Arsenault
Date: 2024-06-09T22:29:14+02:00
New Revision: 014446c130362914b7e6dc839a8f5a86517cec63

URL: https://github.com/llvm/llvm-project/commit/014446c130362914b7e6dc839a8f5a86517cec63
DIFF: https://github.com/llvm/llvm-project/commit/014446c130362914b7e6dc839a8f5a86517cec63.diff

LOG: GlobalISel: Remove faulty assert in buildAtomicRMW op

Vectors are supported for fp operations now, so remove the assert. The
supported type/operation combinations are best left for the verifier.
Avoids regression in future commit that starts treating some vector
cases as legal.

Added: 
    

Modified: 
    llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp b/llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
index afe2703569407..37aa4e0aed7e8 100644
--- a/llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
@@ -996,7 +996,6 @@ MachineInstrBuilder MachineIRBuilder::buildAtomicRMW(
   LLT OldValResTy = OldValRes.getLLTTy(*getMRI());
   LLT AddrTy = Addr.getLLTTy(*getMRI());
   LLT ValTy = Val.getLLTTy(*getMRI());
-  assert(OldValResTy.isScalar() && "invalid operand type");
   assert(AddrTy.isPointer() && "invalid operand type");
   assert(ValTy.isValid() && "invalid operand type");
   assert(OldValResTy == ValTy && "type mismatch");


        


More information about the llvm-commits mailing list