http://llvm.org/bugs/show_bug.cgi?id=3806
Summary: LSR is not APInt-aware
Product: libraries
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Loop Optimizer
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
It seems, that LoopStrengthReduce is not using APInt's in some places. However,
code after optimizers contains, for example, i128's, which leads to numerous
assertions.
Attached is reduction from Qt:
llc: /home/asl/proj/llvm/src/include/llvm/ADT/APInt.h:1051: int64_t
llvm::APInt::getSExtValue() const: Assertion `getMinSignedBits() <= 64 && "Too
many bits for int64_t"' failed.
(gdb) bt
#0 0x00007f3412312535 in raise () from /lib/libc.so.6
#1 0x00007f34123139e0 in abort () from /lib/libc.so.6
#2 0x00007f341230b8bf in __assert_fail () from /lib/libc.so.6
#3 0x0000000000855c2a in llvm::APInt::getSExtValue (this=0x177b0d8)
at /home/asl/proj/llvm/src/include/llvm/ADT/APInt.h:1051
#4 0x0000000000855c49 in llvm::ConstantInt::getSExtValue (this=0x177b0a0)
at /home/asl/proj/llvm/src/include/llvm/Constants.h:84
#5 0x0000000000f91658 in CheckForIVReuse (this=0x17595c0, HasBaseReg=false,
AllUsesAreAddresses=false,
AllUsesAreOutsideLoop=false, stri...@0x177b910, i...@0x7fff1b3f5940,
Ty=0x173cd40, userstoproce...@0x7fff1b3f5980)
at
/home/asl/proj/llvm/src/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1322
#6 0x0000000000f941f0 in StrengthReduceStridedIVUsers (this=0x17595c0,
stri...@0x177b910, us...@0x177b918, L=0x1774c90)
at
/home/asl/proj/llvm/src/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1889
#7 0x0000000000f95eb4 in runOnLoop (this=0x17595c0, L=0x1774c90,
l...@0x175ace0)
at
/home/asl/proj/llvm/src/lib/Transforms/Scalar/LoopStrengthReduce.cpp:2630
#8 0x0000000000ff52f3 in llvm::LPPassManager::runOnFunction (this=0x175ace0,
f...@0x173d1d0)
at /home/asl/proj/llvm/src/lib/Analysis/LoopPass.cpp:224
#9 0x00000000010a7348 in llvm::FPPassManager::runOnFunction (this=0x1750ca0,
f...@0x173d1d0)
at /home/asl/proj/llvm/src/lib/VMCore/PassManager.cpp:1324
#10 0x00000000010a78bd in llvm::FunctionPassManagerImpl::run (this=0x1743d60,
f...@0x173d1d0)
at /home/asl/proj/llvm/src/lib/VMCore/PassManager.cpp:1281
#11 0x00000000010a7a1e in llvm::FunctionPassManager::run (this=0x7fff1b3f6060,
f...@0x173d1d0)
at /home/asl/proj/llvm/src/lib/VMCore/PassManager.cpp:1233
#12 0x000000000080c63a in main (argc=2, argv=0x7fff1b3f6298) at
/home/asl/proj/llvm/src/tools/llc/llc.cpp:319
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs