Marius Wachtler
2009-Aug-21 15:49 UTC
[LLVMdev] Possible Typo in SelectionDAGLowering::visitShuffleVector
Hello While building LLVM, the compiler (static analysis) is giving me a warning about "if (RangeUse[0] == 0 && RangeUse[0] == 0) {". Can somebody familar with the codebase look over it, maybe this should be "if (RangeUse[0] == 0 && RangeUse[1] == 0) {", otherwise sorry for the noise. Index: F:/dev/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp ==================================================================--- F:/dev/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp (revision 79629) +++ F:/dev/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp (working copy) @@ -2522,7 +2522,7 @@ } } - if (RangeUse[0] == 0 && RangeUse[0] == 0) { + if (RangeUse[0] == 0 && RangeUse[1] == 0) { setValue(&I, DAG.getUNDEF(VT)); // Vectors are not used. return; } Marius Wachtler -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090821/3fd69d3a/attachment.html>
Bill Wendling
2009-Aug-21 18:16 UTC
[LLVMdev] Possible Typo in SelectionDAGLowering::visitShuffleVector
On Aug 21, 2009, at 8:49 AM, Marius Wachtler wrote:> Hello > > While building LLVM, the compiler (static analysis) is giving me a > warning about "if (RangeUse[0] == 0 && RangeUse[0] == 0) {". > Can somebody familar with the codebase look over it, maybe this > should be "if (RangeUse[0] == 0 && RangeUse[1] == 0) {", otherwise > sorry for the noise. > > > > Index: F:/dev/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp > ==================================================================> --- F:/dev/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp > (revision 79629) > +++ F:/dev/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp > (working copy) > @@ -2522,7 +2522,7 @@ > } > } > > - if (RangeUse[0] == 0 && RangeUse[0] == 0) { > + if (RangeUse[0] == 0 && RangeUse[1] == 0) { > setValue(&I, DAG.getUNDEF(VT)); // Vectors are not used. > return; > } >That's not good. Looks like a major typo. Fixed. Thanks for catching it! -bw
Mon Ping
2009-Aug-21 18:17 UTC
[LLVMdev] Possible Typo in SelectionDAGLowering::visitShuffleVector
Hi, Your fix looks good. Please commit. Thanks, -- Mon Ping On Aug 21, 2009, at 9:49 AM, Marius Wachtler <malloc at inode.at> wrote:> Hello > > While building LLVM, the compiler (static analysis) is giving me a > warning about "if (RangeUse[0] == 0 && RangeUse[0] == 0) {". > Can somebody familar with the codebase look over it, maybe this > should be "if (RangeUse[0] == 0 && RangeUse[1] == 0) {", otherwise > sorry for the noise. > > > > Index: F:/dev/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp > ==================================================================> --- F:/dev/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp > (revision 79629) > +++ F:/dev/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp > (working copy) > @@ -2522,7 +2522,7 @@ > } > } > > - if (RangeUse[0] == 0 && RangeUse[0] == 0) { > + if (RangeUse[0] == 0 && RangeUse[1] == 0) { > setValue(&I, DAG.getUNDEF(VT)); // Vectors are not used. > return; > } > > Marius Wachtler > > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev