https://bugs.llvm.org/show_bug.cgi?id=41718
Bug ID: 41718
Summary: [X86] X86BaseInfo.h - getOperandBias - string literal
in if()
Product: libraries
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: Backend: X86
Assignee: unassignedb...@nondot.org
Reporter: llvm-...@redking.me.uk
CC: craig.top...@gmail.com, llvm-bugs@lists.llvm.org,
llvm-...@redking.me.uk, spatel+l...@rotateright.com
inline unsigned getOperandBias(const MCInstrDesc& Desc) {
....
case 2:
// XCHG/XADD have two destinations and two sources.
if (NumOps >= 4 && Desc.getOperandConstraint(2, MCOI::TIED_TO) == 0 &&
Desc.getOperandConstraint(3, MCOI::TIED_TO) == 1)
return 2;
// Check for gather. AVX-512 has the second tied operand early. AVX2
// has it as the last op.
if (NumOps == 9 && Desc.getOperandConstraint(2, MCOI::TIED_TO) == 0 &&
(Desc.getOperandConstraint(3, MCOI::TIED_TO) == 1 ||
Desc.getOperandConstraint(8, MCOI::TIED_TO) == 1) &&
"Instruction with 2 defs isn't gather?")
return 2;
return 0;
}
}
Cppcheck complains that we have a string literal (always resolves to true) in
the if() condition - shouldn't this just be a comment?
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs