[llvm-bugs] [Bug 25012] New: Assert in early-cse: (New->getType() == getType() && "replaceAllUses of value with new value of different type!")

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Oct 1 03:34:59 PDT 2015


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

            Bug ID: 25012
           Summary: Assert in early-cse: (New->getType() == getType() &&
                    "replaceAllUses of value with new value of different
                    type!")
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Scalar Optimizations
          Assignee: unassignedbugs at nondot.org
          Reporter: james.molloy at arm.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Random testing found the following testcase failing when run with `opt
-early-cse -disable-output`:

target datalayout = "e-m:e-i64:64-i128:128-n32:64-S128"
target triple = "aarch64--linux-gnu"

; Function Attrs: nounwind readonly argmemonly
declare { <4 x i16>, <4 x i16>, <4 x i16>, <4 x i16> }
@llvm.aarch64.neon.ld4.v4i16.p0v4i16(<4 x i16>*)

; Function Attrs: nounwind
define void @dotests_356() {
entry:
  store <4 x i16> undef, <4 x i16>* undef, align 8
  %vld4454 = call { <4 x i16>, <4 x i16>, <4 x i16>, <4 x i16> }
@llvm.aarch64.neon.ld4.v4i16.p0v4i16(<4 x i16>* undef)
  %vld4454.fca.0.extract = extractvalue { <4 x i16>, <4 x i16>, <4 x i16>, <4 x
i16> } %vld4454, 0
  unreachable
}

Debug output is amusing:

EarlyCSE CSE LOAD:   %vld4454 = call { <4 x i16>, <4 x i16>, <4 x i16>, <4 x
i16> } @llvm.aarch64.neon.ld4.v4i16.p0v4i16(<4 x i16>* undef)  to:   store <4 x
i16> undef, <4 x i16>* undef, align 8

A load of {<4 x i16>...} to a store of <4 x i16>!

This doesn't look like a recent regression - it looks latent.

-- 
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/20151001/b61f6f24/attachment-0001.html>


More information about the llvm-bugs mailing list