@@ -1866,24 +1866,6 @@ Instruction *InstCombinerImpl::visitFPTrunc(FPTruncInst &FPT) {
18661866
18671867 return UnaryOperator::CreateFNegFMF (InnerTrunc, Op);
18681868 }
1869-
1870- // If we are truncating a select that has an extended operand, we can
1871- // narrow the other operand and do the select as a narrow op.
1872- Value *Cond, *X, *Y;
1873- if (match (Op, m_Select (m_Value (Cond), m_FPExt (m_Value (X)), m_Value (Y))) &&
1874- X->getType () == Ty) {
1875- // fptrunc (select Cond, (fpext X), Y --> select Cond, X, (fptrunc Y)
1876- Value *NarrowY = Builder.CreateFPTrunc (Y, Ty);
1877- Value *Sel = Builder.CreateSelect (Cond, X, NarrowY, " narrow.sel" , Op);
1878- return replaceInstUsesWith (FPT, Sel);
1879- }
1880- if (match (Op, m_Select (m_Value (Cond), m_Value (Y), m_FPExt (m_Value (X)))) &&
1881- X->getType () == Ty) {
1882- // fptrunc (select Cond, Y, (fpext X) --> select Cond, (fptrunc Y), X
1883- Value *NarrowY = Builder.CreateFPTrunc (Y, Ty);
1884- Value *Sel = Builder.CreateSelect (Cond, NarrowY, X, " narrow.sel" , Op);
1885- return replaceInstUsesWith (FPT, Sel);
1886- }
18871869 }
18881870
18891871 if (auto *II = dyn_cast<IntrinsicInst>(FPT.getOperand (0 ))) {
0 commit comments