From 3699261d3f49d65cee6a645c849c41cdca51a01f Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Tue, 20 Sep 2011 07:38:59 +0000 Subject: Extend changes from r139986 to produce 256-bit AVX minps/minpd/maxps/maxpd. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140140 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/X86/X86ISelLowering.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'lib/Target') diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index a570cd1609..c21b1dcc24 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/lib/Target/X86/X86ISelLowering.cpp @@ -12567,9 +12567,12 @@ static SDValue PerformSELECTCombine(SDNode *N, SelectionDAG &DAG, // instructions match the semantics of the common C idiom xhasXMMInt() && Cond.getOpcode() == ISD::SETCC && - (LHS.getValueType() == MVT::f32 || LHS.getValueType() == MVT::f64 || - LHS.getValueType() == MVT::v4f32 || LHS.getValueType() == MVT::v2f64)) { + if (Cond.getOpcode() == ISD::SETCC && + ((Subtarget->hasXMMInt() && + (LHS.getValueType() == MVT::f32 || LHS.getValueType() == MVT::v4f32 || + LHS.getValueType() == MVT::f64 || LHS.getValueType() == MVT::v2f64)) || + (Subtarget->hasAVX() && + (LHS.getValueType() == MVT::v8f32 || LHS.getValueType() == MVT::v4f64)))) { ISD::CondCode CC = cast(Cond.getOperand(2))->get(); unsigned Opcode = 0; -- cgit v1.2.3-70-g09d2