[llvm-commits] [llvm-gcc-4.2] r48570 - /llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp
Evan Cheng
evan.cheng at apple.com
Wed Mar 19 16:40:47 PDT 2008
Author: evancheng
Date: Wed Mar 19 18:40:47 2008
New Revision: 48570
URL: http://llvm.org/viewvc/llvm-project?rev=48570&view=rev
Log:
Don't lower mmx shift with immediate operand to non-immediate form.
Modified:
llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp
Modified: llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp?rev=48570&r1=48569&r2=48570&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp Wed Mar 19 18:40:47 2008
@@ -78,17 +78,6 @@
case IX86_BUILTIN_PMULLW128:
Result = Builder.CreateMul(Ops[0], Ops[1], "tmp");
return true;
- case IX86_BUILTIN_PSLLWI: {
- Function *psllw =
- Intrinsic::getDeclaration(TheModule, Intrinsic::x86_mmx_psll_w);
- Ops[1] = Builder.CreateZExt(Ops[1], Type::Int64Ty, "zext");
- Ops[1] = Builder.CreateBitCast(Ops[1],
- VectorType::get(Type::Int64Ty, 1),
- "bitcast");
- Result = Builder.CreateCall(psllw, Ops.begin(), Ops.begin()+2, "tmp");
- Result = Builder.CreateBitCast(Result, ResultType, "tmp");
- return true;
- }
case IX86_BUILTIN_PSLLWI128: {
Function *psllw =
Intrinsic::getDeclaration(TheModule, Intrinsic::x86_sse2_psll_w);
@@ -99,17 +88,6 @@
Result = Builder.CreateBitCast(Result, ResultType, "tmp");
return true;
}
- case IX86_BUILTIN_PSLLDI: {
- Function *pslld =
- Intrinsic::getDeclaration(TheModule, Intrinsic::x86_mmx_psll_d);
- Ops[1] = Builder.CreateZExt(Ops[1], Type::Int64Ty, "zext");
- Ops[1] = Builder.CreateBitCast(Ops[1],
- VectorType::get(Type::Int64Ty, 1),
- "bitcast");
- Result = Builder.CreateCall(pslld, Ops.begin(), Ops.begin()+2, "tmp");
- Result = Builder.CreateBitCast(Result, ResultType, "tmp");
- return true;
- }
case IX86_BUILTIN_PSLLDI128: {
Function *pslld
= Intrinsic::getDeclaration(TheModule, Intrinsic::x86_sse2_psll_d);
@@ -119,17 +97,6 @@
Result = Builder.CreateBitCast(Result, ResultType, "tmp");
return true;
}
- case IX86_BUILTIN_PSLLQI: {
- Function *psllq =
- Intrinsic::getDeclaration(TheModule, Intrinsic::x86_mmx_psll_q);
- Ops[1] = Builder.CreateZExt(Ops[1], Type::Int64Ty, "zext");
- Ops[1] = Builder.CreateBitCast(Ops[1],
- VectorType::get(Type::Int64Ty, 1),
- "bitcast");
- Result = Builder.CreateCall(psllq, Ops.begin(), Ops.begin()+2, "tmp");
- Result = Builder.CreateBitCast(Result, ResultType, "tmp");
- return true;
- }
case IX86_BUILTIN_PSLLQI128: {
Function *psllq =
Intrinsic::getDeclaration(TheModule, Intrinsic::x86_sse2_psll_q);
@@ -140,17 +107,6 @@
Result = Builder.CreateBitCast(Result, ResultType, "tmp");
return true;
}
- case IX86_BUILTIN_PSRLWI: {
- Function *psrlw =
- Intrinsic::getDeclaration(TheModule, Intrinsic::x86_mmx_psrl_w);
- Ops[1] = Builder.CreateZExt(Ops[1], Type::Int64Ty, "zext");
- Ops[1] = Builder.CreateBitCast(Ops[1],
- VectorType::get(Type::Int64Ty, 1),
- "bitcast");
- Result = Builder.CreateCall(psrlw, Ops.begin(), Ops.begin()+2, "tmp");
- Result = Builder.CreateBitCast(Result, ResultType, "tmp");
- return true;
- }
case IX86_BUILTIN_PSRLWI128: {
Function *psrlw =
Intrinsic::getDeclaration(TheModule, Intrinsic::x86_sse2_psrl_w);
@@ -161,17 +117,6 @@
Result = Builder.CreateBitCast(Result, ResultType, "tmp");
return true;
}
- case IX86_BUILTIN_PSRLDI: {
- Function *psrld =
- Intrinsic::getDeclaration(TheModule, Intrinsic::x86_mmx_psrl_d);
- Ops[1] = Builder.CreateZExt(Ops[1], Type::Int64Ty, "zext");
- Ops[1] = Builder.CreateBitCast(Ops[1],
- VectorType::get(Type::Int64Ty, 1),
- "bitcast");
- Result = Builder.CreateCall(psrld, Ops.begin(), Ops.begin()+2, "tmp");
- Result = Builder.CreateBitCast(Result, ResultType, "tmp");
- return true;
- }
case IX86_BUILTIN_PSRLDI128: {
Function *psrld =
Intrinsic::getDeclaration(TheModule, Intrinsic::x86_sse2_psrl_d);
@@ -181,17 +126,6 @@
Result = Builder.CreateBitCast(Result, ResultType, "tmp");
return true;
}
- case IX86_BUILTIN_PSRLQI: {
- Function *psrlq =
- Intrinsic::getDeclaration(TheModule, Intrinsic::x86_mmx_psrl_q);
- Ops[1] = Builder.CreateZExt(Ops[1], Type::Int64Ty, "zext");
- Ops[1] = Builder.CreateBitCast(Ops[1],
- VectorType::get(Type::Int64Ty, 1),
- "bitcast");
- Result = Builder.CreateCall(psrlq, Ops.begin(), Ops.begin()+2, "tmp");
- Result = Builder.CreateBitCast(Result, ResultType, "tmp");
- return true;
- }
case IX86_BUILTIN_PSRLQI128: {
Function *psrlq =
Intrinsic::getDeclaration(TheModule, Intrinsic::x86_sse2_psrl_q);
@@ -202,17 +136,6 @@
Result = Builder.CreateBitCast(Result, ResultType, "tmp");
return true;
}
- case IX86_BUILTIN_PSRAWI: {
- Function *psraw =
- Intrinsic::getDeclaration(TheModule, Intrinsic::x86_mmx_psra_w);
- Ops[1] = Builder.CreateZExt(Ops[1], Type::Int64Ty, "zext");
- Ops[1] = Builder.CreateBitCast(Ops[1],
- VectorType::get(Type::Int64Ty, 1),
- "bitcast");
- Result = Builder.CreateCall(psraw, Ops.begin(), Ops.begin()+2, "tmp");
- Result = Builder.CreateBitCast(Result, ResultType, "tmp");
- return true;
- }
case IX86_BUILTIN_PSRAWI128: {
Function *psraw =
Intrinsic::getDeclaration(TheModule, Intrinsic::x86_sse2_psra_w);
@@ -223,17 +146,6 @@
Result = Builder.CreateBitCast(Result, ResultType, "tmp");
return true;
}
- case IX86_BUILTIN_PSRADI: {
- Function *psrad =
- Intrinsic::getDeclaration(TheModule, Intrinsic::x86_mmx_psra_d);
- Ops[1] = Builder.CreateZExt(Ops[1], Type::Int64Ty, "zext");
- Ops[1] = Builder.CreateBitCast(Ops[1],
- VectorType::get(Type::Int64Ty, 1),
- "bitcast");
- Result = Builder.CreateCall(psrad, Ops.begin(), Ops.begin()+2, "tmp");
- Result = Builder.CreateBitCast(Result, ResultType, "tmp");
- return true;
- }
case IX86_BUILTIN_PSRADI128: {
Function *psrad =
Intrinsic::getDeclaration(TheModule, Intrinsic::x86_sse2_psra_d);
More information about the llvm-commits
mailing list