diff --git a/llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp b/llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp --- a/llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp +++ b/llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp @@ -971,10 +971,6 @@ continue; } - // Don't merge volatiles. - if (MBBI->hasOrderedMemoryRef()) - return false; - int Swizzled = AMDGPU::getNamedOperandIdx(MBBI->getOpcode(), AMDGPU::OpName::swz); if (Swizzled != -1 && MBBI->getOperand(Swizzled).getImm())