assert(CI);
uint64_t val = CI->getZExtValue();
CI = ConstantInt::get(Builder.getInt1Ty(), (val & 0x2) >> 1);
- Value *Runtime = Builder.getInt32(0); // FIXME: use BoundsChecking here?
Value *F = CGM.getIntrinsic(Intrinsic::objectsize, ResType);
- return RValue::get(Builder.CreateCall3(F,
- EmitScalarExpr(E->getArg(0)),
- CI, Runtime));
+ return RValue::get(Builder.CreateCall2(F, EmitScalarExpr(E->getArg(0)),CI));
}
case Builtin::BI__builtin_prefetch: {
Value *Locality, *RW, *Address = EmitScalarExpr(E->getArg(0));
llvm::Value *F = CGM.getIntrinsic(llvm::Intrinsic::objectsize, IntPtrTy);
llvm::Value *Min = Builder.getFalse();
- llvm::Value *Runtime = Builder.getInt32(BoundsChecking);
- llvm::Value *C = Builder.CreateCall3(F, Address, Min, Runtime);
+ llvm::Value *C = Builder.CreateCall2(F, Address, Min);
llvm::BasicBlock *Cont = createBasicBlock();
Builder.CreateCondBr(Builder.CreateICmpUGE(C,
llvm::ConstantInt::get(IntPtrTy, Size)),
double f(int b, int i) {
double a[b];
return a[i];
- // CHECK: objectsize.i64({{.*}}, i1 false, i32 4)
+ // CHECK: objectsize.i64({{.*}}, i1 false)
// CHECK: icmp uge i64 {{.*}}, 8
}
// CHECK: @f2
void f2() {
int a[2];
- // CHECK: objectsize.i64({{.*}}, i1 false, i32 4)
+ // CHECK: objectsize.i64({{.*}}, i1 false)
// CHECK: icmp uge i64 {{.*}}, 4
a[1] = 42;
short *b = malloc(64);
- // CHECK: objectsize.i64({{.*}}, i1 false, i32 4)
+ // CHECK: objectsize.i64({{.*}}, i1 false)
// CHECK: icmp uge i64 {{.*}}, 4
// CHECK: getelementptr {{.*}}, i64 5
- // CHECK: objectsize.i64({{.*}}, i1 false, i32 4)
+ // CHECK: objectsize.i64({{.*}}, i1 false)
// CHECK: icmp uge i64 {{.*}}, 2
b[5] = a[1]+2;
}
// CHECK: define void @test5
void test5() {
// CHECK: = load i8** @gp
- // CHECK-NEXT:= call i64 @llvm.objectsize.i64(i8* %{{.*}}, i1 false, i32 0)
+ // CHECK-NEXT:= call i64 @llvm.objectsize.i64(i8* %{{.*}}, i1 false)
strcpy(gp, "Hi there");
}
// CHECK: define void @test7
void test7() {
int i;
- // CHECK: = call i64 @llvm.objectsize.i64(i8* {{.*}}@gbuf{{.*}}, i1 false, i32 0)
+ // CHECK: = call i64 @llvm.objectsize.i64(i8* {{.*}}@gbuf{{.*}}, i1 false)
strcpy((++i, gbuf), "Hi there");
}