[llvm-commits] [PATCH] add boolean simplification support for RDRAND intrinsics
Michael Liao
michael.liao at intel.com
Wed Sep 5 23:13:42 PDT 2012
On Wed, 2012-09-05 at 23:05 -0700, Michael Liao wrote:
> On Wed, 2012-09-05 at 23:03 -0700, Craig Topper wrote:
> > This change seems unrelated as its floating point related and rdrand
> > is integer.
>
> Sorry, I mixed a cleanup patch to a previous patch (part of PR12312). If
> it looks OK, shall I submit it separately?
Here is the patch after the cleanup patch is removed. Sorry for
confusion. Please review this patch. Thanks.
Yours
- Michael
>
> Yours
> - Michael
>
> >
> > @@ -14165,22 +14195,6 @@ static SDValue checkFlaggedOrCombine(SDValue
> > Or, X86::CondCode &CC,
> > return DAG.getNode(X86ISD::PTEST, DL, MVT::i32, VecIn, VecIn);
> > }
> >
> > -static bool isValidFCMOVCondition(X86::CondCode CC) {
> > - switch (CC) {
> > - default:
> > - return false;
> > - case X86::COND_B:
> > - case X86::COND_BE:
> > - case X86::COND_E:
> > - case X86::COND_P:
> > - case X86::COND_AE:
> > - case X86::COND_A:
> > - case X86::COND_NE:
> > - case X86::COND_NP:
> > - return true;
> > - }
> > -}
> > -
> > /// Optimize X86ISD::CMOV [LHS, RHS, CONDCODE (e.g. X86::COND_NE),
> > CONDVAL]
> > static SDValue PerformCMOVCombine(SDNode *N, SelectionDAG &DAG,
> > TargetLowering::DAGCombinerInfo
> > &DCI,
> > @@ -14212,7 +14226,7 @@ static SDValue PerformCMOVCombine(SDNode *N,
> > SelectionDAG &DAG,
> > Flags = checkBoolTestSetCCCombine(Cond, CC);
> > if (Flags.getNode() &&
> > // Extra check as FCMOV only supports a subset of X86 cond.
> > - (FalseOp.getValueType() != MVT::f80 ||
> > isValidFCMOVCondition(CC))) {
> > + (FalseOp.getValueType() != MVT::f80 || hasFPCMov(CC))) {
> > SDValue Ops[] = { FalseOp, TrueOp,
> > DAG.getConstant(CC, MVT::i8), Flags };
> > return DAG.getNode(X86ISD::CMOV, DL, N->getVTList(),
> >
> > On Wed, Sep 5, 2012 at 3:01 PM, Michael Liao <michael.liao at intel.com>
> > wrote:
> > Ping.
> >
> > Thanks for review
> > - Michael
> >
> > On Tue, 2012-08-28 at 00:12 -0700, Michael Liao wrote:
> > > Hi
> > >
> > > The attached patch adds the boolean simplification support
> > for RDRAND
> > > intrinsics which, following GCC approach, generate its
> > boolean result by
> > > CMOV instead of SETCC. In addition, this patch cleans up the
> > redundant
> > > code previously added.
> > >
> > > Thanks for your review.
> > >
> > > Yours
> > > - Michael
> >
> > > _______________________________________________
> > > llvm-commits mailing list
> > > llvm-commits at cs.uiuc.edu
> > > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> >
> >
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> >
> >
> >
> > --
> > ~Craig
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-add-rdrand-boolean-simplication-support.patch
Type: text/x-patch
Size: 4017 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120905/7389cce6/attachment.bin>
More information about the llvm-commits
mailing list