[llvm-bugs] [Bug 43919] New: [X86] combineStore - unreachable code

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Nov 6 07:03:51 PST 2019


https://bugs.llvm.org/show_bug.cgi?id=43919

            Bug ID: 43919
           Summary: [X86] combineStore - unreachable code
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: X86
          Assignee: unassignedbugs at nondot.org
          Reporter: llvm-dev at redking.me.uk
                CC: craig.topper at gmail.com, llvm-bugs at lists.llvm.org,
                    llvm-dev at redking.me.uk, spatel+llvm at rotateright.com
            Blocks: 30996

This code block contains logic that results in unreachable code:

if ((VT == MVT::i64 && F64IsLegal && !Subtarget.is64Bit()) &&
    isa<LoadSDNode>(St->getValue()) &&
    cast<LoadSDNode>(St->getValue())->isSimple() &&
    St->getChain().hasOneUse() && St->isSimple()) {

   if (Subtarget.is64Bit() || F64IsLegal) {
     // ALWAYS TAKEN
   }

   // UNREACHABLE CODE
}

F64IsLegal is always true and Subtarget.is64Bit() is always false.

@craog - this seems to be a legacy of
-x86-experimental-vector-widening-legalization

Found by PVS Studio


Referenced Bugs:

https://bugs.llvm.org/show_bug.cgi?id=30996
[Bug 30996] [META] PVS Studio Warnings
-- 
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/20191106/3cb56f89/attachment.html>


More information about the llvm-bugs mailing list