@@ -4446,10 +4446,18 @@ void Verifier::visitLoadInst(LoadInst &LI) {
44464446 Check (LI.getOrdering () != AtomicOrdering::Release &&
44474447 LI.getOrdering () != AtomicOrdering::AcquireRelease,
44484448 " Load cannot have Release ordering" , &LI);
4449- Check (ElTy->isIntOrPtrTy () || ElTy->isFloatingPointTy (),
4450- " atomic load operand must have integer, pointer, or floating point "
4451- " type!" ,
4452- ElTy, &LI);
4449+ if (TT.isX86 ())
4450+ Check (ElTy->getScalarType ()->isIntOrPtrTy () ||
4451+ ElTy->getScalarType ()->isFloatingPointTy (),
4452+ " atomic load operand must have integer, pointer, floating point, "
4453+ " or vector type!" ,
4454+ ElTy, &LI);
4455+ else
4456+ Check (ElTy->isIntOrPtrTy () || ElTy->isFloatingPointTy (),
4457+ " atomic load operand must have integer, pointer, or floating point "
4458+ " type!" ,
4459+ ElTy, &LI);
4460+
44534461 checkAtomicMemAccessSize (ElTy, &LI);
44544462 } else {
44554463 Check (LI.getSyncScopeID () == SyncScope::System,
@@ -4472,10 +4480,17 @@ void Verifier::visitStoreInst(StoreInst &SI) {
44724480 Check (SI.getOrdering () != AtomicOrdering::Acquire &&
44734481 SI.getOrdering () != AtomicOrdering::AcquireRelease,
44744482 " Store cannot have Acquire ordering" , &SI);
4475- Check (ElTy->isIntOrPtrTy () || ElTy->isFloatingPointTy (),
4476- " atomic store operand must have integer, pointer, or floating point "
4477- " type!" ,
4478- ElTy, &SI);
4483+ if (TT.isX86 ())
4484+ Check (ElTy->getScalarType ()->isIntOrPtrTy () ||
4485+ ElTy->getScalarType ()->isFloatingPointTy (),
4486+ " atomic store operand must have integer, pointer, floating point, "
4487+ " or vector type!" ,
4488+ ElTy, &SI);
4489+ else
4490+ Check (ElTy->isIntOrPtrTy () || ElTy->isFloatingPointTy (),
4491+ " atomic load operand must have integer, pointer, or floating point "
4492+ " type!" ,
4493+ ElTy, &LI);
44794494 checkAtomicMemAccessSize (ElTy, &SI);
44804495 } else {
44814496 Check (SI.getSyncScopeID () == SyncScope::System,
0 commit comments