Skip to content

Conversation

@kwk
Copy link
Contributor

@kwk kwk commented Dec 4, 2025

VmpaIntID was used in variable definition of VmpaIntID.

/home/fedora/src/llvm-project/main/llvm/lib/Target/Hexagon/HexagonGenWideningVecInstr.cpp: In member function ‘bool {anonymous}::HexagonGenWideningVecInstr::replaceWithVmpaIntrinsic(llvm::Instruction*, OPInfo*)’:
/home/fedora/src/llvm-project/main/llvm/lib/Target/Hexagon/HexagonGenWideningVecInstr.cpp:843:41: warning: operation on ‘VmpaIntID’ may be undefined [-Wsequence-point]
  843 |       (NewResEltSize == 16) ? VmpaIntID = Intrinsic::hexagon_V6_vmpabus_128B
      |                               ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

@llvmbot
Copy link
Member

llvmbot commented Dec 4, 2025

@llvm/pr-subscribers-backend-hexagon

Author: Konrad Kleine (kwk)

Changes

VmpaIntID was used in variable definition of VmpaIntID.

/home/fedora/src/llvm-project/main/llvm/lib/Target/Hexagon/HexagonGenWideningVecInstr.cpp: In member function ‘bool {anonymous}::HexagonGenWideningVecInstr::replaceWithVmpaIntrinsic(llvm::Instruction*, OPInfo*)’:
/home/fedora/src/llvm-project/main/llvm/lib/Target/Hexagon/HexagonGenWideningVecInstr.cpp:843:41: warning: operation on ‘VmpaIntID’ may be undefined [-Wsequence-point]
  843 |       (NewResEltSize == 16) ? VmpaIntID = Intrinsic::hexagon_V6_vmpabus_128B
      |                               ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Full diff: https://github.com/llvm/llvm-project/pull/170646.diff

1 Files Affected:

  • (modified) llvm/lib/Target/Hexagon/HexagonGenWideningVecInstr.cpp (+2-2)
diff --git a/llvm/lib/Target/Hexagon/HexagonGenWideningVecInstr.cpp b/llvm/lib/Target/Hexagon/HexagonGenWideningVecInstr.cpp
index 8df22ae6ebb06..3ee76fe5d4f98 100644
--- a/llvm/lib/Target/Hexagon/HexagonGenWideningVecInstr.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonGenWideningVecInstr.cpp
@@ -840,8 +840,8 @@ bool HexagonGenWideningVecInstr::replaceWithVmpaIntrinsic(Instruction *Inst,
   Value *VecOP = IRB.CreateCall(ExtF, {NewVOP1, NewVOP2});
 
   Intrinsic::ID VmpaIntID =
-      (NewResEltSize == 16) ? VmpaIntID = Intrinsic::hexagon_V6_vmpabus_128B
-                            : VmpaIntID = Intrinsic::hexagon_V6_vmpauhb_128B;
+      (NewResEltSize == 16) ? Intrinsic::hexagon_V6_vmpabus_128B
+                            : Intrinsic::hexagon_V6_vmpauhb_128B;
   ExtF = Intrinsic::getOrInsertDeclaration(M, VmpaIntID);
   auto *ResType =
       FixedVectorType::get(getElementTy(NewResEltSize, IRB), NumElts);

@github-actions
Copy link

github-actions bot commented Dec 4, 2025

✅ With the latest revision this PR passed the C/C++ code formatter.

`VmpaIntID` was used in variable definition of `VmpaIntID`.

```
/home/fedora/src/llvm-project/main/llvm/lib/Target/Hexagon/HexagonGenWideningVecInstr.cpp: In member function ‘bool {anonymous}::HexagonGenWideningVecInstr::replaceWithVmpaIntrinsic(llvm::Instruction*, OPInfo*)’:
/home/fedora/src/llvm-project/main/llvm/lib/Target/Hexagon/HexagonGenWideningVecInstr.cpp:843:41: warning: operation on ‘VmpaIntID’ may be undefined [-Wsequence-point]
  843 |       (NewResEltSize == 16) ? VmpaIntID = Intrinsic::hexagon_V6_vmpabus_128B
      |                               ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```

This was introduced in llvm#169559
@kwk kwk force-pushed the fix-hexagon-assignment branch from 73b8caa to ca4580a Compare December 4, 2025 12:01
Copy link
Contributor

@nikic nikic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kwk kwk merged commit f49504a into llvm:main Dec 4, 2025
10 checks passed
kcloudy0717 pushed a commit to kcloudy0717/llvm-project that referenced this pull request Dec 4, 2025
`VmpaIntID` was used in variable definition of `VmpaIntID`.

```
/home/fedora/src/llvm-project/main/llvm/lib/Target/Hexagon/HexagonGenWideningVecInstr.cpp: In member function ‘bool {anonymous}::HexagonGenWideningVecInstr::replaceWithVmpaIntrinsic(llvm::Instruction*, OPInfo*)’:
/home/fedora/src/llvm-project/main/llvm/lib/Target/Hexagon/HexagonGenWideningVecInstr.cpp:843:41: warning: operation on ‘VmpaIntID’ may be undefined [-Wsequence-point]
  843 |       (NewResEltSize == 16) ? VmpaIntID = Intrinsic::hexagon_V6_vmpabus_128B
      |                               ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants