https://llvm.org/bugs/show_bug.cgi?id=24521
Bug ID: 24521
Summary: assert in GVN::propagateEquality assert(LHS->getType()
== RHS->getType() && "Equality but unequal types!")
Product: new-bugs
Version: 3.7
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: new bugs
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
When passing the following IR to the passmanager I'm getting assert failures on
some test code.
The IR works fine on 3.6.2. but with 3.7rc2 i'm getting assertion errors.
define double @bugfunc1(double %y, i64 %z) #0 {
entry:
%"1_k" = alloca i64
store i64 %z, i64* %"1_k"
br label %loopcond
loop: ; preds = %loopcond
%load.ident = load i64, i64* %"1_k"
%addIntTmp = add i64 %load.ident, 1
store i64 %addIntTmp, i64* %"1_k"
br label %loopcond
loopcond: ; preds = %loop, %entry
%load.ident1 = load i64, i64* %"1_k"
%cmpIntTmp = icmp slt i64 %load.ident1, 3
br i1 %cmpIntTmp, label %loop, label %loopexit
loopexit: ; preds = %loopcond
ret double 1.000000e+00
}
If I replace the
%cmpIntTmp = icmp slt i64 %load.ident1, 3
with a constant true, then the error goes away. It seems that something is
going wrong while trying to optimize the icmp instr.
The pass manager is initialized as:
passmanager = LLVMCreateFunctionPassManagerForModule(module);
LLVMAddTargetData(LLVMGetExecutionEngineTargetData(engine), passmanager);
LLVMAddBasicAliasAnalysisPass(passmanager);
LLVMAddPromoteMemoryToRegisterPass(passmanager);
LLVMAddInstructionCombiningPass(passmanager);
LLVMAddReassociatePass(passmanager);
LLVMAddGVNPass(passmanager);
LLVMAddCFGSimplificationPass(passmanager);
LLVMInitializeFunctionPassManager(passmanager);
I'm using visual studio 2015.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs