return V(::builder->CreateFPToSI(v, destType));
}
- Value *Nucleus::createUIToFP(Value *v, Type *destType)
- {
- return V(::builder->CreateUIToFP(v, destType));
- }
-
Value *Nucleus::createSIToFP(Value *v, Type *destType)
{
return V(::builder->CreateSIToFP(v, destType));
return rhs;
}
- RValue<Byte> Byte::operator=(const Byte &rhs)
+ RValue<Byte> Byte::operator=(const Byte &rhs)
{
Value *value = rhs.loadValue();
storeValue(value);
{
xyzw.parent = this;
- Value *xyzw = Nucleus::createUIToFP(cast.value, Float4::getType());
+ RValue<Float4> result = Float4(Int4(cast & UInt4(0x7FFFFFFF))) +
+ As<Float4>((As<Int4>(cast) >> 31) & As<Int4>(Float4(0x80000000u)));
- storeValue(xyzw);
+ storeValue(result.value);
}
Float4::Float4()
static Value *createZExt(Value *V, Type *destType);
static Value *createSExt(Value *V, Type *destType);
static Value *createFPToSI(Value *V, Type *destType);
- static Value *createUIToFP(Value *V, Type *destType);
static Value *createSIToFP(Value *V, Type *destType);
static Value *createFPTrunc(Value *V, Type *destType);
static Value *createFPExt(Value *V, Type *destType);
return createCast(Ice::InstCast::Fptosi, v, destType);
}
- Value *Nucleus::createUIToFP(Value *v, Type *destType)
- {
- return createCast(Ice::InstCast::Uitofp, v, destType);
- }
-
Value *Nucleus::createSIToFP(Value *v, Type *destType)
{
return createCast(Ice::InstCast::Sitofp, v, destType);
{
xyzw.parent = this;
- Value *xyzw = Nucleus::createUIToFP(cast.value, Float4::getType());
+ RValue<Float4> result = Float4(Int4(cast & UInt4(0x7FFFFFFF))) +
+ As<Float4>((As<Int4>(cast) >> 31) & As<Int4>(Float4(0x80000000u)));
- storeValue(xyzw);
+ storeValue(result.value);
}
Float4::Float4()