Skip to content

Commit f1ab2e5

Browse files
kwkkcloudy0717
authored andcommitted
[Hexagon] Fix assignment (llvm#170646)
`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 | ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ```
1 parent a2419ac commit f1ab2e5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/lib/Target/Hexagon/HexagonGenWideningVecInstr.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -839,9 +839,9 @@ bool HexagonGenWideningVecInstr::replaceWithVmpaIntrinsic(Instruction *Inst,
839839
NewVOP2 = IRB.CreateBitCast(NewVOP2, InType);
840840
Value *VecOP = IRB.CreateCall(ExtF, {NewVOP1, NewVOP2});
841841

842-
Intrinsic::ID VmpaIntID =
843-
(NewResEltSize == 16) ? VmpaIntID = Intrinsic::hexagon_V6_vmpabus_128B
844-
: VmpaIntID = Intrinsic::hexagon_V6_vmpauhb_128B;
842+
Intrinsic::ID VmpaIntID = (NewResEltSize == 16)
843+
? Intrinsic::hexagon_V6_vmpabus_128B
844+
: Intrinsic::hexagon_V6_vmpauhb_128B;
845845
ExtF = Intrinsic::getOrInsertDeclaration(M, VmpaIntID);
846846
auto *ResType =
847847
FixedVectorType::get(getElementTy(NewResEltSize, IRB), NumElts);

0 commit comments

Comments
 (0)