mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-07 01:38:26 +00:00
Fix PR4206 - crash in simplify lib calls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71644 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
60dc7345eb
commit
bcc2e7dc2c
@ -1116,7 +1116,7 @@ struct VISIBILITY_HIDDEN FFSOpt : public LibCallOptimization {
|
||||
Value *F = Intrinsic::getDeclaration(Callee->getParent(),
|
||||
Intrinsic::cttz, &ArgType, 1);
|
||||
Value *V = B.CreateCall(F, Op, "cttz");
|
||||
V = B.CreateAdd(V, ConstantInt::get(Type::Int32Ty, 1), "tmp");
|
||||
V = B.CreateAdd(V, ConstantInt::get(V->getType(), 1), "tmp");
|
||||
V = B.CreateIntCast(V, Type::Int32Ty, false, "tmp");
|
||||
|
||||
Value *Cond = B.CreateICmpNE(Op, Constant::getNullValue(ArgType), "tmp");
|
||||
|
@ -28,3 +28,9 @@ define i32 @main() {
|
||||
ret i32 %rslt5
|
||||
}
|
||||
|
||||
|
||||
; PR4206
|
||||
define i32 @a(i64) nounwind {
|
||||
%2 = call i32 @ffsll(i64 %0) ; <i32> [#uses=1]
|
||||
ret i32 %2
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user