return RValue::get(Result);
}
+ case Builtin::BI__builtin_fmod:
+ case Builtin::BI__builtin_fmodf:
+ case Builtin::BI__builtin_fmodl: {
+ Value *Arg1 = EmitScalarExpr(E->getArg(0));
+ Value *Arg2 = EmitScalarExpr(E->getArg(1));
+ Value *Result = Builder.CreateFRem(Arg1, Arg2, "fmod");
+ return RValue::get(Result);
+ }
case Builtin::BI__builtin_conj:
case Builtin::BI__builtin_conjf:
// CHECK: and i1
}
+// CHECK-LABEL: define void @test_float_builtin_ops
+void test_float_builtin_ops(float F, double D, long double LD) {
+ volatile float resf;
+ volatile double resd;
+ volatile long double resld;
+
+ resf = __builtin_fmodf(F,F);
+ // CHECK: frem float
+
+ resd = __builtin_fmod(D,D);
+ // CHECK: frem double
+
+ resld = __builtin_fmodl(LD,LD);
+ // CHECK: frem x86_fp80
+}
+
// CHECK-LABEL: define void @test_builtin_longjmp
void test_builtin_longjmp(void **buffer) {
// CHECK: [[BITCAST:%.*]] = bitcast