mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-28 06:24:57 +00:00
Teach instcombine about the rest of the SSE and SSE2 conversion
intrinsics element dependencies. Reviewed by Nick. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123161 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -540,9 +540,16 @@ Instruction *InstCombiner::visitCallInst(CallInst &CI) {
|
||||
return new StoreInst(II->getArgOperand(1), Ptr);
|
||||
}
|
||||
break;
|
||||
|
||||
case Intrinsic::x86_sse_cvttss2si: {
|
||||
// These intrinsics only demands the 0th element of its input vector. If
|
||||
|
||||
case Intrinsic::x86_sse_cvtss2si:
|
||||
case Intrinsic::x86_sse_cvtss2si64:
|
||||
case Intrinsic::x86_sse_cvttss2si:
|
||||
case Intrinsic::x86_sse_cvttss2si64:
|
||||
case Intrinsic::x86_sse2_cvtsd2si:
|
||||
case Intrinsic::x86_sse2_cvtsd2si64:
|
||||
case Intrinsic::x86_sse2_cvttsd2si:
|
||||
case Intrinsic::x86_sse2_cvttsd2si64: {
|
||||
// These intrinsics only demand the 0th element of their input vectors. If
|
||||
// we can simplify the input based on that, do so now.
|
||||
unsigned VWidth =
|
||||
cast<VectorType>(II->getArgOperand(0)->getType())->getNumElements();
|
||||
@ -555,7 +562,7 @@ Instruction *InstCombiner::visitCallInst(CallInst &CI) {
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
case Intrinsic::ppc_altivec_vperm:
|
||||
// Turn vperm(V1,V2,mask) -> shuffle(V1,V2,mask) if mask is a constant.
|
||||
if (ConstantVector *Mask = dyn_cast<ConstantVector>(II->getArgOperand(2))) {
|
||||
|
Reference in New Issue
Block a user