[llvm-bugs] [Bug 47942] New: [PPC] Suspicious repeated condition in PPCTargetLowering.LowerBUILD_VECTOR
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Oct 22 03:59:56 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=47942
Bug ID: 47942
Summary: [PPC] Suspicious repeated condition in
PPCTargetLowering.LowerBUILD_VECTOR
Product: libraries
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: Backend: PowerPC
Assignee: unassignedbugs at nondot.org
Reporter: llvm-dev at redking.me.uk
CC: llvm-bugs at lists.llvm.org, nemanja.i.ibm at gmail.com
Noticed by cppcheck:
// vsplti + srl self.
if (SextVal == (int)((unsigned)i >> TypeShiftAmt)) {
...
}
// vsplti + sra self.
if (SextVal == (int)((unsigned)i >> TypeShiftAmt)) {
...
}
The second condition is always dead code - its also suspicious that a "SextVal"
is being used for a logical shift right splat extraction.
Looking in a recent code coverage report, some of the other splat patterns are
not tested either:
http://lab.llvm.org:8080/coverage/coverage-reports/coverage/Users/buildslave/jenkins/workspace/coverage/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp.html
// t = vsplti c, result = vsldoi t, t, 2
// t = vsplti c, result = vsldoi t, t, 3
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20201022/9dff1520/attachment.html>
More information about the llvm-bugs
mailing list