[llvm] r220342 - Add minnum / maxnum codegen

Hal Finkel hfinkel at anl.gov
Thu Oct 23 23:51:28 PDT 2014


----- Original Message -----
> From: "Matt Arsenault" <Matthew.Arsenault at amd.com>
> To: llvm-commits at cs.uiuc.edu
> Sent: Tuesday, October 21, 2014 6:01:02 PM
> Subject: [llvm] r220342 - Add minnum / maxnum codegen
> 
> Author: arsenm
> Date: Tue Oct 21 18:01:01 2014
> New Revision: 220342
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=220342&view=rev
> Log:
> Add minnum / maxnum codegen
> 
> Added:
>     llvm/trunk/test/CodeGen/PowerPC/fmaxnum.ll
>     llvm/trunk/test/CodeGen/PowerPC/fminnum.ll
>     llvm/trunk/test/CodeGen/R600/fmaxnum.f64.ll
>     llvm/trunk/test/CodeGen/R600/fmaxnum.ll
>     llvm/trunk/test/CodeGen/R600/fminnum.f64.ll
>     llvm/trunk/test/CodeGen/R600/fminnum.ll
>     llvm/trunk/test/CodeGen/X86/fmaxnum.ll
>     llvm/trunk/test/CodeGen/X86/fminnum.ll
> Modified:
>     llvm/trunk/include/llvm/CodeGen/ISDOpcodes.h
>     llvm/trunk/include/llvm/CodeGen/RuntimeLibcalls.h
>     llvm/trunk/include/llvm/CodeGen/SelectionDAG.h
>     llvm/trunk/lib/CodeGen/BasicTargetTransformInfo.cpp
>     llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
>     llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
>     llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
>     llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypes.h
>     llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp
>     llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
>     llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
>     llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
>     llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp
>     llvm/trunk/lib/CodeGen/TargetLoweringBase.cpp
>     llvm/trunk/lib/Target/R600/AMDGPUISelLowering.cpp
>     llvm/trunk/lib/Target/R600/SIISelLowering.cpp
>     llvm/trunk/lib/Target/R600/SIInstructions.td
>     llvm/trunk/lib/Target/X86/X86ISelLowering.cpp

[snip]

>  
> +/// visitBinaryFloatCall - If a call instruction is a unary
> floating-point

The comment above still says unary instead of binary.

> +/// operation (as expected), translate it to an SDNode with the
> specified opcode
> +/// and return true.
> +bool SelectionDAGBuilder::visitBinaryFloatCall(const CallInst &I,
> +                                               unsigned Opcode) {
> +  // Sanity check that it really is a unary floating-point call.

Same here.

> +  if (I.getNumArgOperands() != 2 ||
> +      !I.getArgOperand(0)->getType()->isFloatingPointTy() ||
> +      I.getType() != I.getArgOperand(0)->getType() ||
> +      I.getType() != I.getArgOperand(1)->getType() ||
> +      !I.onlyReadsMemory())
> +    return false;
> +
> +  SDValue Tmp0 = getValue(I.getArgOperand(0));
> +  SDValue Tmp1 = getValue(I.getArgOperand(1));
> +  EVT VT = Tmp0.getValueType();
> +  setValue(&I, DAG.getNode(Opcode, getCurSDLoc(), VT, Tmp0, Tmp1));
> +  return true;
> +}
> +

[snip]

Thanks again,
Hal

> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> 

-- 
Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory



More information about the llvm-commits mailing list