Changeset View
Changeset View
Standalone View
Standalone View
llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp
Show First 20 Lines • Show All 3,258 Lines • ▼ Show 20 Lines | if (const ConstantFP *C0 = dyn_cast<ConstantFP>(Src0)) { | ||||
} | } | ||||
} | } | ||||
if (isa<UndefValue>(Src0) && isa<UndefValue>(Src1)) | if (isa<UndefValue>(Src0) && isa<UndefValue>(Src1)) | ||||
return replaceInstUsesWith(*II, UndefValue::get(II->getType())); | return replaceInstUsesWith(*II, UndefValue::get(II->getType())); | ||||
break; | break; | ||||
} | } | ||||
case Intrinsic::amdgcn_cvt_pknorm_i16: | |||||
case Intrinsic::amdgcn_cvt_pknorm_u16: | |||||
case Intrinsic::amdgcn_cvt_pk_i16: | |||||
case Intrinsic::amdgcn_cvt_pk_u16: { | |||||
Value *Src0 = II->getArgOperand(0); | |||||
Value *Src1 = II->getArgOperand(1); | |||||
if (isa<UndefValue>(Src0) && isa<UndefValue>(Src1)) | |||||
return replaceInstUsesWith(*II, UndefValue::get(II->getType())); | |||||
break; | |||||
} | |||||
case Intrinsic::amdgcn_ubfe: | case Intrinsic::amdgcn_ubfe: | ||||
case Intrinsic::amdgcn_sbfe: { | case Intrinsic::amdgcn_sbfe: { | ||||
// Decompose simple cases into standard shifts. | // Decompose simple cases into standard shifts. | ||||
Value *Src = II->getArgOperand(0); | Value *Src = II->getArgOperand(0); | ||||
if (isa<UndefValue>(Src)) | if (isa<UndefValue>(Src)) | ||||
return replaceInstUsesWith(*II, Src); | return replaceInstUsesWith(*II, Src); | ||||
unsigned Width; | unsigned Width; | ||||
▲ Show 20 Lines • Show All 1,117 Lines • Show Last 20 Lines |