[llvm-bugs] [Bug 32758] New: Assertion failed: (V->getType()->isIntOrIntVectorTy() && DestTy->isIntOrIntVectorTy() && "Can only sign extend/truncate integers!")
via llvm-bugs
llvm-bugs at lists.llvm.org
Sun Apr 23 11:24:28 PDT 2017
https://bugs.llvm.org/show_bug.cgi?id=32758
Bug ID: 32758
Summary: Assertion failed: (V->getType()->isIntOrIntVectorTy()
&& DestTy->isIntOrIntVectorTy() && "Can only sign
extend/truncate integers!")
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Loop Optimizer
Assignee: unassignedbugs at nondot.org
Reporter: vvasilev at cern.ch
CC: llvm-bugs at lists.llvm.org
The following example fails:
cat TGL5DPainter-9198e0.cpp
double a, b, c;
double Sqrt(double);
template <typename Iterator>
double RMS(Iterator p1, Iterator p2) {
double n;
while (p1 != p2) {
a += b;
++p1;
++n;
}
Sqrt(b / (n - 1));
}
bool InitGeometry() { RMS(&c, &c); }
20:21:51-vvassilev~/workspace/reproducers/PR_LoopVectorizer$ cat test.sh
#!/bin/bash
/Users/vvassilev/workspace/llvm-git/inst/bin/clang++ -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name
TGL5DPainter.cxx -mrelocation-model pic -pic-level 2 -mthread-model posix
-menable-no-infs -menable-no-nans -menable-unsafe-fp-math -fno-signed-zeros
-freciprocal-math -fno-trapping-math -ffp-contract=fast -ffast-math
-ffinite-math-only -masm-verbose -mconstructor-aliases -munwind-tables
-fuse-init-array -target-cpu x86-64 -momit-leaf-frame-pointer
-dwarf-column-info -debugger-tuning=gdb -coverage-notes-file
/build/jenkins/workspace/root-nightly-cxxmodules/BUILDTYPE/Optimized/COMPILER/clang_gcc62/LABEL/slc6/build/TGL5DPainter.cxx.gcno
-D NDEBUG -O3 -Wshadow -Wall -W -Woverloaded-virtual -Wc++11-narrowing
-Wsign-compare -Wsometimes-uninitialized -Wconditional-uninitialized
-Wheader-guard -Warray-bounds -Wcomment -Wtautological-compare -Wstrncat-size
-Wloop-analysis -Wbool-conversion -std=c++11 -fdeprecated-macro -ferror-limit
19 -fmessage-length 126 -pthread -fobjc-runtime=gcc -fcxx-exceptions
-fexceptions -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops
-vectorize-slp -x c++ TGL5DPainter-9198e0.cpp 2>&1 | grep -q 'Assertion failed:
(V->getType()->isIntOrIntVectorTy() && DestTy->isIntOrIntVectorTy() && "Can
only sign extend/truncate integers!"), function CreateSExtOrTrunc'
Failure:
Assertion failed: (V->getType()->isIntOrIntVectorTy() &&
DestTy->isIntOrIntVectorTy() && "Can only sign extend/truncate integers!"),
function CreateSExtOrTrunc, file
/Users/vvassilev/workspace/llvm-git/src/include/llvm/IR/IRBuilder.h, line 1350.
0 clang++ 0x00000001029368c8
llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 40
1 clang++ 0x0000000102936fc6 SignalHandler(int) + 454
2 libsystem_platform.dylib 0x00007fff8b73552a _sigtramp + 26
3 libsystem_platform.dylib 0x00007fc9e1c49070 _sigtramp + 1448164192
4 libsystem_c.dylib 0x00007fff8f7ed6df abort + 129
5 libsystem_c.dylib 0x00007fff8f7b4dd8 basename + 0
6 clang++ 0x00000001026f9f52
llvm::IRBuilder<llvm::ConstantFolder,
llvm::IRBuilderDefaultInserter>::CreateSExtOrTrunc(llvm::Value*, llvm::Type*,
llvm::Twine const&) + 194
7 clang++ 0x0000000102a679cd (anonymous
namespace)::InnerLoopVectorizer::vectorizeLoop() + 9213
8 clang++ 0x0000000102a51b20 (anonymous
namespace)::InnerLoopVectorizer::vectorize() + 8048
9 clang++ 0x0000000102a48d9c
llvm::LoopVectorizePass::processLoop(llvm::Loop*) + 19548
10 clang++ 0x0000000102a52505
llvm::LoopVectorizePass::runImpl(llvm::Function&, llvm::ScalarEvolution&,
llvm::LoopInfo&, llvm::TargetTransformInfo&, llvm::DominatorTree&,
llvm::BlockFrequencyInfo&, llvm::TargetLibraryInfo*, llvm::DemandedBits&,
llvm::AAResults&, llvm::AssumptionCache&,
std::__1::function<llvm::LoopAccessInfo const& (llvm::Loop&)>&,
llvm::OptimizationRemarkEmitter&) + 549
11 clang++ 0x0000000102a53ec3 (anonymous
namespace)::LoopVectorize::runOnFunction(llvm::Function&) + 1235
12 clang++ 0x000000010237a323
llvm::FPPassManager::runOnFunction(llvm::Function&) + 547
13 clang++ 0x000000010237a583
llvm::FPPassManager::runOnModule(llvm::Module&) + 51
14 clang++ 0x000000010237aace
llvm::legacy::PassManagerImpl::run(llvm::Module&) + 958
15 clang++ 0x0000000102b63924
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions
const&, clang::CodeGenOptions const&, clang::TargetOptions const&,
clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*,
clang::BackendAction, std::__1::unique_ptr<llvm::raw_pwrite_stream,
std::__1::default_delete<llvm::raw_pwrite_stream> >) + 15748
16 clang++ 0x0000000102d9ca3f
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) + 927
17 clang++ 0x0000000103799885 clang::ParseAST(clang::Sema&,
bool, bool) + 469
18 clang++ 0x000000010301338c clang::FrontendAction::Execute()
+ 76
19 clang++ 0x0000000102fd0561
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 1217
20 clang++ 0x0000000103074412
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 4914
21 clang++ 0x0000000101b71925 cc1_main(llvm::ArrayRef<char
const*>, char const*, void*) + 1221
22 clang++ 0x0000000101b70123 main + 11859
23 libdyld.dylib 0x00007fff9d9e65ad start + 1
24 libdyld.dylib 0x0000000000000045 start + 1650563737
Stack dump:
0. Program arguments: /Users/vvassilev/workspace/llvm-git/inst/bin/clang++
-cc1 -triple x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name
TGL5DPainter.cxx -mrelocation-model pic -pic-level 2 -mthread-model posix
-menable-no-infs -menable-no-nans -menable-unsafe-fp-math -fno-signed-zeros
-freciprocal-math -fno-trapping-math -ffp-contract=fast -ffast-math
-ffinite-math-only -masm-verbose -mconstructor-aliases -munwind-tables
-fuse-init-array -target-cpu x86-64 -momit-leaf-frame-pointer
-dwarf-column-info -debugger-tuning=gdb -coverage-notes-file
/build/jenkins/workspace/root-nightly-cxxmodules/BUILDTYPE/Optimized/COMPILER/clang_gcc62/LABEL/slc6/build/TGL5DPainter.cxx.gcno
-D NDEBUG -O3 -Wshadow -Wall -W -Woverloaded-virtual -Wc++11-narrowing
-Wsign-compare -Wsometimes-uninitialized -Wconditional-uninitialized
-Wheader-guard -Warray-bounds -Wcomment -Wtautological-compare -Wstrncat-size
-Wloop-analysis -Wbool-conversion -std=c++11 -fdeprecated-macro -ferror-limit
19 -fmessage-length 126 -pthread -fobjc-runtime=gcc -fcxx-exceptions
-fexceptions -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops
-vectorize-slp -x c++ TGL5DPainter-9198e0.cpp
1. <eof> parser at end of file
2. Per-module optimization passes
3. Running pass 'Function Pass Manager' on module
'TGL5DPainter-9198e0.cpp'.
4. Running pass 'Loop Vectorization' on function '@_Z3RMSIPdEdT_S1_'
Abort trap: 6
--
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/20170423/86541071/attachment.html>
More information about the llvm-bugs
mailing list