[llvm-bugs] [Bug 43402] New: After r359095, Assertion failed: ((HOp.getValueType() == MVT::v2f64 || HOp.getValueType() == MVT::v4f64) && HOp.getValueType() == VT && "Unexpected type for h-op"), function foldShuffleOfHorizOp

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Sep 23 02:57:57 PDT 2019


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

            Bug ID: 43402
           Summary: After r359095, Assertion failed: ((HOp.getValueType()
                    == MVT::v2f64 || HOp.getValueType() == MVT::v4f64) &&
                    HOp.getValueType() == VT && "Unexpected type for
                    h-op"), function foldShuffleOfHorizOp
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: dimitry at andric.com
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org

As reported in https://bugs.freebsd.org/240759, after
https://reviews.llvm.org/rL359095 ("[x86] make sure horizontal op and broadcast
types match to simplify (bug 41414)"), self-hosting llvm 9.0.0 for i386 results
in:

Assertion failed: ((HOp.getValueType() == MVT::v2f64 || HOp.getValueType() ==
MVT::v4f64) && HOp.getValueType() == VT && "Unexpected type for h-op"),
function foldShuffleOfHorizOp, file
/home/dim/src/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp, line 32854.
Stack dump:
0.      Program arguments: /home/dim/ins/llvm-trunk-r359095/bin/clang -cc1
-triple i386-- -S -target-cpu haswell -O1 -vectorize-slp xray-account-min.cpp 
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module 'xray-account-min.cpp'.
4.      Running pass 'X86 DAG->DAG Instruction Selection' on function
'@"_ZNK1c1fIZNKS_1dERK1aE3$_0EEvS3_T_"'
0  clang       0x00000000028bfce8
llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 40
1  clang       0x00000000028bdbf8 llvm::sys::RunSignalHandlers() + 248
2  clang       0x00000000028c0578
llvm::sys::PrintStackTraceOnErrorSignal(llvm::StringRef, bool) + 1256
3  libthr.so.3 0x00000008044dc430 _pthread_sigmask + 1328
Abort trap

Before this change, the assertion was different, and corresponds to what
appears to have been fixed for bug 41414:

Assertion failed: ((!From->hasAnyUseOfValue(i) || From->getValueType(i) ==
To->getValueType(i)) && "Cannot use this version of ReplaceAllUsesWith!"),
function ReplaceAllUsesWith, file
/home/dim/src/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp, line 8144.
Stack dump:
0.      Program arguments: /home/dim/ins/llvm-trunk-r359094/bin/clang -cc1
-triple i386-- -S -target-cpu haswell -O1 -vectorize-slp xray-account-min.cpp 
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module 'xray-account-min.cpp'.
4.      Running pass 'X86 DAG->DAG Instruction Selection' on function
'@"_ZNK1c1fIZNKS_1dERK1aE3$_0EEvS3_T_"'
0  clang       0x00000000028bfbd8
llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 40
1  clang       0x00000000028bdae8 llvm::sys::RunSignalHandlers() + 248
2  clang       0x00000000028c0468
llvm::sys::PrintStackTraceOnErrorSignal(llvm::StringRef, bool) + 1256
3  libthr.so.3 0x00000008044db430 _pthread_sigmask + 1328
Abort trap

Minimized test case:

// clang -cc1 -triple i386-- -S -target-cpu haswell -O1 -vectorize-slp
xray-account-min.cpp
struct a {
  unsigned long long b;
};
struct c {
  void d(const a &) const;
  template <class e> void f(const a &, e) const;
  double g;
  double h;
  double i;
  double j;
} k;
template <class e> void c::f(const a &l, e) const {
  auto &m = k;
  m.g /= l.b;
  m.h /= l.b;
  m.i /= l.b;
  m.j /= l.b;
}
void c::d(const a &l) const {
  f(l, [] {});
}

-- 
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/20190923/0cbaccd5/attachment-0001.html>


More information about the llvm-bugs mailing list