Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(487)

Unified Diff: lib/CodeGen/CGExprScalar.cpp

Issue 7824006: [clang] Conditionally include target intrinsics, based on --enable-target Base URL: https://llvm.org/svn/llvm-project/cfe/trunk/
Patch Set: Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/CodeGen/CGBuiltin.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/CodeGen/CGExprScalar.cpp
===================================================================
--- lib/CodeGen/CGExprScalar.cpp (revision 138929)
+++ lib/CodeGen/CGExprScalar.cpp (working copy)
@@ -2072,6 +2072,7 @@
BuiltinType::Kind ElemKind) {
switch (ElemKind) {
default: assert(0 && "unexpected element type");
+#if 0
case BuiltinType::Char_U:
case BuiltinType::UChar:
return (IT == VCMPEQ) ? llvm::Intrinsic::ppc_altivec_vcmpequb_p :
@@ -2104,6 +2105,7 @@
return (IT == VCMPEQ) ? llvm::Intrinsic::ppc_altivec_vcmpeqfp_p :
llvm::Intrinsic::ppc_altivec_vcmpgtfp_p;
break;
+#endif
}
return llvm::Intrinsic::not_intrinsic;
}
@@ -2162,8 +2164,13 @@
case BO_LE:
if (ElementKind == BuiltinType::Float) {
CR6 = CR6_LT;
+#if defined(TARGET_ENABLED_POWERPC)
ID = llvm::Intrinsic::ppc_altivec_vcmpgefp_p;
std::swap(FirstVecArg, SecondVecArg);
+#else
+ llvm_unreachable("Using Intrinsic::ppc_altivec_vcmpgefp_p w/out"
+ " TARGET_ENABLED_POWERPC defined!");
+#endif // TARGET_ENABLED_POWERPC
}
else {
CR6 = CR6_EQ;
@@ -2173,7 +2180,12 @@
case BO_GE:
if (ElementKind == BuiltinType::Float) {
CR6 = CR6_LT;
+#if defined(TARGET_ENABLED_POWERPC)
ID = llvm::Intrinsic::ppc_altivec_vcmpgefp_p;
+#else
+ llvm_unreachable("Using Intrinsic::ppc_altivec_vcmpgefp_p w/out"
+ " TARGET_ENABLED_POWERPC defined!");
+#endif // TARGET_ENABLED_POWERPC
}
else {
CR6 = CR6_EQ;
« no previous file with comments | « lib/CodeGen/CGBuiltin.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698