[llvm] Removed expansive copy (PR #93658)
via llvm-commits
llvm-commits at lists.llvm.org
Wed May 29 04:40:25 PDT 2024
https://github.com/JaydeepChauhan14 updated https://github.com/llvm/llvm-project/pull/93658
>From 7ed7003881c2466fd3c2c7e1b3a541efc49bd3cb Mon Sep 17 00:00:00 2001
From: Chauhan Jaydeep Ashwinbhai <chauhan.jaydeep.ashwinbhai at intel.com>
Date: Wed, 29 May 2024 16:24:57 +0800
Subject: [PATCH 1/2] Removed expansive copy
---
llvm/lib/Target/X86/X86ISelLowering.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index 2d8343ffa1a0b..c240b4fa6b599 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -3588,7 +3588,7 @@ static bool isUndefOrZeroOrInRange(ArrayRef<int> Mask, int Low, int Hi) {
/// undef.
LLVM_ATTRIBUTE_UNUSED static bool isBlendOrUndef(ArrayRef<int> Mask) {
unsigned NumElts = Mask.size();
- for (auto [I, M] : enumerate(Mask))
+ for (auto &[I, M] : enumerate(Mask))
if (!isUndefOrEqual(M, I) && !isUndefOrEqual(M, I + NumElts))
return false;
return true;
>From 91b28c847855fda9a0095934d7f43bae07dcc489 Mon Sep 17 00:00:00 2001
From: Chauhan Jaydeep Ashwinbhai <chauhan.jaydeep.ashwinbhai at intel.com>
Date: Wed, 29 May 2024 19:23:12 +0800
Subject: [PATCH 2/2] Fixed build error
---
llvm/lib/Target/X86/X86ISelLowering.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index c240b4fa6b599..900031fadf5db 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -3588,7 +3588,7 @@ static bool isUndefOrZeroOrInRange(ArrayRef<int> Mask, int Low, int Hi) {
/// undef.
LLVM_ATTRIBUTE_UNUSED static bool isBlendOrUndef(ArrayRef<int> Mask) {
unsigned NumElts = Mask.size();
- for (auto &[I, M] : enumerate(Mask))
+ for (auto &&[I, M] : enumerate(Mask))
if (!isUndefOrEqual(M, I) && !isUndefOrEqual(M, I + NumElts))
return false;
return true;
More information about the llvm-commits
mailing list