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

Unified Diff: lib/Analysis/ConstantFolding.cpp

Issue 7792066: [llvm] Conditionally include target intrinsics, based on --enable-target Base URL: https://llvm.org/svn/llvm-project/llvm/trunk/
Patch Set: cleanups 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/Analysis/BasicAliasAnalysis.cpp ('k') | lib/Analysis/ValueTracking.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/Analysis/ConstantFolding.cpp
===================================================================
--- lib/Analysis/ConstantFolding.cpp (revision 138929)
+++ lib/Analysis/ConstantFolding.cpp (working copy)
@@ -1058,6 +1058,7 @@
case Intrinsic::umul_with_overflow:
case Intrinsic::convert_from_fp16:
case Intrinsic::convert_to_fp16:
+#if defined(TARGET_ENABLED_X86)
case Intrinsic::x86_sse_cvtss2si:
case Intrinsic::x86_sse_cvtss2si64:
case Intrinsic::x86_sse_cvttss2si:
@@ -1066,6 +1067,7 @@
case Intrinsic::x86_sse2_cvtsd2si64:
case Intrinsic::x86_sse2_cvttsd2si:
case Intrinsic::x86_sse2_cvttsd2si64:
+#endif // TARGET_ENABLED_X86
return true;
default:
return false;
@@ -1303,6 +1305,7 @@
if (ConstantVector *Op = dyn_cast<ConstantVector>(Operands[0])) {
switch (F->getIntrinsicID()) {
default: break;
+#if defined(TARGET_ENABLED_X86)
case Intrinsic::x86_sse_cvtss2si:
case Intrinsic::x86_sse_cvtss2si64:
case Intrinsic::x86_sse2_cvtsd2si:
@@ -1315,6 +1318,7 @@
case Intrinsic::x86_sse2_cvttsd2si64:
if (ConstantFP *FPOp = dyn_cast<ConstantFP>(Op->getOperand(0)))
return ConstantFoldConvertToInt(FPOp, /*roundTowardZero=*/true, Ty);
+#endif // TARGET_ENABLED_X86
}
}
« no previous file with comments | « lib/Analysis/BasicAliasAnalysis.cpp ('k') | lib/Analysis/ValueTracking.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698