Displaying 20 results from an estimated 23 matches for "fp_to_sint".
2010 Mar 19
2
[LLVMdev] getConvertAction/setConvertAction
...tOperationAction(Node->getOpcode(),
Node->getOperand(0).getValueType());
This seems incorrect as SINT_TO_FP should be querying the convert action, and not the Operation action.
i.e. it should be:
case ISD::SINT_TO_FP:
case ISD::UINT_TO_FP:
case ISD::FP_TO_SINT:
case ISD::FP_TO_UINT:
Action = TLI.getConvertAction(Node->getValueType(),
Node->getOperand(0).getValueType());
break;
case ISD::EXTRACT_VECTOR_ELT:
Action = TLI.getOperationAction(Node->getOpcode(),...
2010 Mar 19
0
[LLVMdev] getConvertAction/setConvertAction
...; Node->getOperand(0).getValueType());
>
> This seems incorrect as SINT_TO_FP should be querying the convert action, and not the Operation action.
>
> i.e. it should be:
> case ISD::SINT_TO_FP:
> case ISD::UINT_TO_FP:
> case ISD::FP_TO_SINT:
> case ISD::FP_TO_UINT:
> Action = TLI.getConvertAction(Node->getValueType(),
> Node->getOperand(0).getValueType());
> break;
> case ISD::EXTRACT_VECTOR_ELT:
> Action = TLI.getOperationAction(Node->getOpcode(),
>...
2018 Sep 06
4
Clang for the PlayStation 2
...debug where Mips is producing those TruncIntFP
> nodes. There'll be some constraint it's not checking or an unexpected
> node type, probably related to -msingle-float. I'm afraid I'm not sure
> what yet.
>
I'm reasonably sure the function producing that node
is lowerFP_TO_SINT_STORE in lib/Target/Mips/MipsISelLowering.cpp.
The node before that function executes has an fp_to_sint node which seems
to want to convert an i64 to an f32 which seems...rather odd to me,
honestly. The PS2, for what it's worth, only has an i32 -> f32 instruction,
so I think there's an...
2017 May 11
3
FENV_ACCESS and floating point LibFunc calls
...lse, APFloat::rmNearestTiesToEven);
>
> Tmp1 = DAG.getConstantFP(apf, dl, VT);
>
> Tmp2 = DAG.getSetCC(dl, getSetCCResultType(VT),
>
> Node->getOperand(0),
>
> Tmp1, ISD::SETLT);
>
> True = DAG.getNode(ISD::FP_TO_SINT, dl, NVT, Node->getOperand(0));
>
> // TODO: Should any fast-math-flags be set for the FSUB?
>
> False = DAG.getNode(ISD::FP_TO_SINT, dl, NVT,
>
> DAG.getNode(ISD::FSUB, dl, VT,
>
> Node->getOperand(0)...
2008 Aug 17
1
[LLVMdev] FP_TO_[US]INT dag nodes.
I assume the FP_TO_SINT, FP_TO_UINT use C "round to 0" convention?
What about values out of range? I think C99 standard says these are
undefined.
Thanks,
Dan
2009 Jun 04
2
[LLVMdev] TableGen Type Inference
...n VCVTDQ2PS128rm: Could not infer all types in pattern!
The pattern as written looks like this:
[(set VR128:$dst, (v4f32 (sint_to_fp (bc_memopv4i32 addr:$src))))]
I'm trying to unify AVX/SSE converts in a reasonable way. Right now,
X86InstrSSE.td doesn't have patterns for sint_to_fp and fp_to_sint
with memory operands. I guess this is why, but I don't understand
why it's illegal.
-Dave
2010 Jun 28
0
[LLVMdev] Proposal for adding rounding variant of fpto?i instructions
...at some stage the OpenCL backend could migrate to the standard
conversion instructions.
This is what I propose:
Add a "round" flag to FPToUIInst and FPToSIInst. The absence of this
flag means truncation is needed whereas presence indicates rounding.
The SelectionDAG for FP_TO_UINT and FP_TO_SINT are extended to add
an immediate that indicates whether rounding is needed.
To legalise a rounding FP_TO_UINT or FP_TO_SINT we use the technique
described in [1] to convert the operation into an add/bitcast.
Please let me know what you think.
Thanks,
--
Peter
[1] http://www.d6.com/users/checke...
2017 May 11
2
FENV_ACCESS and floating point LibFunc calls
Sounds like the select lowering issue is definitely separate from the FENV
work.
Is there a bug report with a C or IR example? You want to generate compare
and branch instead of a cmov for something like this?
int foo(float x) {
if (x < 42.0f)
return x;
return 12;
}
define i32 @foo(float %x) {
%cmp = fcmp olt float %x, 4.200000e+01
%conv = fptosi float %x to i32
%ret = select
2017 Apr 21
2
[cfe-dev] FE_INEXACT being set for an exact conversion from float to unsigned long long
...izeInBits());
(void)apf.convertFromAPInt(x, false, APFloat::rmNearestTiesToEven);
Tmp1 = DAG.getConstantFP(apf, dl, VT);
Tmp2 = DAG.getSetCC(dl, getSetCCResultType(VT),
Node->getOperand(0),
Tmp1, ISD::SETLT);
True = DAG.getNode(ISD::FP_TO_SINT, dl, NVT, Node->getOperand(0));
// TODO: Should any fast-math-flags be set for the FSUB?
False = DAG.getNode(ISD::FP_TO_SINT, dl, NVT,
DAG.getNode(ISD::FSUB, dl, VT,
Node->getOperand(0), Tmp1));
False = DAG.getNode(ISD::X...
2016 May 05
6
Code which should exit 1 is exiting 0
I have IR at https://ghostbin.com/paste/daxv5 <https://ghostbin.com/paste/daxv5> which is meant to exit 1, but it is always exiting 0.
I'm using it as a template for checking if two functions @test1 and @test2 are equivalent by checking against the exhaustive possible i16 values. For this particular example it should be enough to know that for certain i16, @test1 and @test2 are *not*
2009 May 21
0
[LLVMdev] [PATCH] Add new phase to legalization to handle vector operations
On Wed, May 20, 2009 at 4:55 PM, Dan Gohman <gohman at apple.com> wrote:
> Can you explain why you chose the approach of using a new pass?
> I pictured removing LegalizeDAG's type legalization code would
> mostly consist of finding all the places that use TLI.getTypeAction
> and just deleting code for handling its Expand and Promote. Are you
> anticipating something more
2009 May 20
2
[LLVMdev] [PATCH] Add new phase to legalization to handle vector operations
On May 20, 2009, at 1:34 PM, Eli Friedman wrote:
> On Wed, May 20, 2009 at 1:19 PM, Eli Friedman
> <eli.friedman at gmail.com> wrote:
>
>> Per subject, this patch adding an additional pass to handle vector
>>
>> operations; the idea is that this allows removing the code from
>>
>> LegalizeDAG that handles illegal types, which should be a significant
2009 May 21
2
[LLVMdev] [PATCH] Add new phase to legalization to handle vector operations
...e(DAG.getEntryNode(), dl, Op, StackSlot, NULL, 0);
+ SDValue Store2 = DAG.getStore(Store1, dl, DAG.getConstant(0, MVT::i32),
+ OffsetSlot, NULL, 0);
+ return BuildFILD(Op, MVT::i64, Store2, StackSlot, DAG);
}
std::pair<SDValue,SDValue> X86TargetLowering::
-FP_TO_SINTHelper(SDValue Op, SelectionDAG &DAG) {
+FP_TO_INTHelper(SDValue Op, SelectionDAG &DAG, bool IsSigned) {
DebugLoc dl = Op.getDebugLoc();
- assert(Op.getValueType().getSimpleVT() <= MVT::i64 &&
- Op.getValueType().getSimpleVT() >= MVT::i16 &&
+
+ MVT DstTy =...
2009 Jun 05
0
[LLVMdev] TableGen Type Inference
...r all types in pattern!
>
> The pattern as written looks like this:
>
> [(set VR128:$dst, (v4f32 (sint_to_fp (bc_memopv4i32 addr:$src))))]
>
> I'm trying to unify AVX/SSE converts in a reasonable way. Right now,
> X86InstrSSE.td doesn't have patterns for sint_to_fp and fp_to_sint
> with memory operands. I guess this is why, but I don't understand
> why it's illegal.
>
> -Dave
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
&...
2011 Apr 01
0
[LLVMdev] Assert in VerifySDNode
...MPXCHG8_DAG - Compare and swap.
LCMPXCHG_DAG,
LCMPXCHG8_DAG,
// VZEXT_LOAD - Load, scalar_to_vector, and zero extend.
VZEXT_LOAD,
// FNSTCW16m - Store FP control world into i16 memory.
FNSTCW16m,
/// FP_TO_INT*_IN_MEM - This instruction implements FP_TO_SINT with the
/// integer destination in memory and a FP reg source. This corresponds
/// to the X86::FIST*m instructions and the rounding mode change stuff. It
/// has two inputs (token chain and address) and two outputs (int value
/// and token chain).
FP_TO_INT16_I...
2011 Apr 01
2
[LLVMdev] Assert in VerifySDNode
> -----Original Message-----
> From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu]
> On Behalf Of Duncan Sands
> Sent: Thursday, March 31, 2011 7:43 PM
> To: llvmdev at cs.uiuc.edu
> Subject: Re: [LLVMdev] Assert in VerifySDNode
>
> Hi Micah,
>
> > assert(!isa<MemSDNode>(N) && "Bad MemSDNode!");
>
> you
2009 May 20
2
[LLVMdev] [PATCH] Add new phase to legalization to handle vector operations
...case ISD::XOR:
+ case ISD::SHL:
+ case ISD::SRA:
+ case ISD::SRL:
+ case ISD::ROTL:
+ case ISD::ROTR:
+ case ISD::CTTZ:
+ case ISD::CTLZ:
+ case ISD::CTPOP:
+ case ISD::SELECT:
+ case ISD::SELECT_CC:
+ case ISD::SINT_TO_FP:
+ case ISD::UINT_TO_FP:
+ case ISD::FP_TO_SINT:
+ case ISD::FP_TO_UINT:
+ case ISD::FNEG:
+ case ISD::FABS:
+ case ISD::FSQRT:
+ case ISD::FSIN:
+ case ISD::FCOS:
+ case ISD::FPOWI:
+ case ISD::FPOW:
+ case ISD::FLOG:
+ case ISD::FLOG2:
+ case ISD::FLOG10:
+ case ISD::FEXP:
+ case ISD::FEXP2:
+ case ISD...
2008 Oct 07
0
[LLVMdev] Multi instruction pattern help
On Oct 7, 2008, at 9:30 AM, Villmow, Micah wrote:
> Chris,
> Thanks for the help, this will help me with writing more patterns,
> but I am still hitting another roadblock. I attempted what you
> suggested and it fixed that issue, but then it started giving a
> warning that there is an unknown node in the resulting pattern.
>
> // unsigned int: f64->i32 ==>
2008 Oct 07
3
[LLVMdev] Multi instruction pattern help
Chris,
Thanks for the help, this will help me with writing more patterns, but
I am still hitting another roadblock. I attempted what you suggested and
it fixed that issue, but then it started giving a warning that there is
an unknown node in the resulting pattern.
// unsigned int: f64->i32 ==> f64->f32 + f32->i32
def : Pat<(i32 (fp_to_uint (f64 GPR:$src0))),
(i32
2009 May 20
0
[LLVMdev] [PATCH] Add new phase to legalization to handle vector operations
...SD::ROTR:
+ case ISD::CTTZ:
+ case ISD::CTLZ:
+ case ISD::CTPOP:
+ case ISD::SELECT:
+ case ISD::SELECT_CC:
+ case ISD::ZERO_EXTEND:
+ case ISD::ANY_EXTEND:
+ case ISD::TRUNCATE:
+ case ISD::SIGN_EXTEND:
+ case ISD::SINT_TO_FP:
+ case ISD::UINT_TO_FP:
+ case ISD::FP_TO_SINT:
+ case ISD::FP_TO_UINT:
+ case ISD::FNEG:
+ case ISD::FABS:
+ case ISD::FSQRT:
+ case ISD::FSIN:
+ case ISD::FCOS:
+ case ISD::FPOWI:
+ case ISD::FPOW:
+ case ISD::FLOG:
+ case ISD::FLOG2:
+ case ISD::FLOG10:
+ case ISD::FEXP:
+ case ISD::FEXP2:
+ case ISD...