[llvm] [ScalarizeMaskedMemIntr] Don't use a scalar mask on GPUs (PR #104842)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 19 13:04:26 PDT 2024


================
@@ -629,8 +641,8 @@ static void scalarizeMaskedScatter(const DataLayout &DL, CallInst *CI,
 
   // If the mask is not v1i1, use scalar bit test operations. This generates
   // better results on X86 at least.
-  Value *SclrMask;
-  if (VectorWidth != 1) {
+  Value *SclrMask = nullptr;
+  if (!TTI.hasBranchDivergence() && VectorWidth != 1) {
----------------
arsenm wrote:

Ditto 

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


More information about the llvm-commits mailing list