[llvm] [X86][AVX] Fix handling of out-of-bounds shift amounts in AVX2 vector shift nodes (PR #84426)

via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 11 09:08:23 PDT 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff 6e27dd47e1fc17cf661b568901fe7392ed1b8f2b f48f6a56bd88dbc5c105c62be99b980ee2b416c1 -- llvm/lib/Target/X86/X86ISelLowering.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index ea15702c1d..82828d62aa 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -28927,8 +28927,8 @@ SDValue X86TargetLowering::LowerWin64_INT128_TO_FP(SDValue Op,
 // supported by the Subtarget
 static bool supportedVectorShiftWithImm(EVT VT, const X86Subtarget &Subtarget,
                                         unsigned Opcode) {
-  assert(Opcode == ISD::SHL || Opcode == ISD::SRA || Opcode == ISD::SRL &&
-        "Unexpected Opcode!");
+  assert(Opcode == ISD::SHL || Opcode == ISD::SRA ||
+         Opcode == ISD::SRL && "Unexpected Opcode!");
 
   if (!VT.isSimple())
     return false;

``````````

</details>


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


More information about the llvm-commits mailing list