Displaying 3 results from an estimated 3 matches for "lowerfsqrt".
2016 Jun 24
2
creating Intrinsic DAG Node
...v <llvm-dev at lists.llvm.org> wrote:
>
> given the following C code:
>
> float b=16, a=0;
> int main() {
> float a = sqrt(b);
> return0;
> }
>
> I'm trying to lower FSQRT down, but getting a casting issue, my code is:
>
> SDValue XXXLowering::LowerFSQRT(SDValue Op, SelectionDAG &DAG) const {
> SDLoc DL(Op);
> EVT VT = Op.getValueType();
> SDValue LHS = Op.getOperand(0);
>
> SDValue newNode = DAG.getNode(ISD::INTRINSIC_WO_CHAIN, DL, VT, DAG.getTargetConstantFP(Intrinsic::my_intrinsic, DL, VT), LHS);
> return ne...
2016 Jun 24
3
creating Intrinsic DAG Node
...>>
>> given the following C code:
>>
>> float b=16, a=0;
>> int main() {
>> float a = sqrt(b);
>> return0;
>> }
>>
>> I'm trying to lower FSQRT down, but getting a casting issue, my code is:
>>
>> SDValue XXXLowering::LowerFSQRT(SDValue Op, SelectionDAG &DAG) const {
>> SDLoc DL(Op);
>> EVT VT = Op.getValueType();
>> SDValue LHS = Op.getOperand(0);
>>
>> SDValue newNode = DAG.getNode(ISD::INTRINSIC_WO_CHAIN, DL, VT,
>> DAG.getTargetConstantFP(Intrinsic::my_intrinsic, DL,...
2016 Feb 02
2
creating Intrinsic DAG Node
Matt,
The added intrinsic in DAG looks like:
0xbedb698: i32 = llvm.MyIntrinsic 0xbedb200, 0xbedac18 [ORD=4]
The builtin in DAG looks like:
0xbedb2a8: i32,ch = llvm 0xbedb158:1, 0xbedb200, 0xbedb158 [ORD=7] [ID=16]
The only difference I'm seeing is the extra operand, which is a 'ch'
from a load.
On Tue, Feb 2, 2016 at 3:55 PM, Matt Arsenault <arsenm2 at gmail.com>