[llvm] 70066dd - [PowerPC] Fixing buildbod failure ppc64le-lld-multistage-test
Masoud Ataei via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 2 10:29:49 PST 2022
Author: Masoud Ataei
Date: 2022-02-02T10:29:22-08:00
New Revision: 70066dd0e85547f03f802878405e86c20b630b12
URL: https://github.com/llvm/llvm-project/commit/70066dd0e85547f03f802878405e86c20b630b12
DIFF: https://github.com/llvm/llvm-project/commit/70066dd0e85547f03f802878405e86c20b630b12.diff
LOG: [PowerPC] Fixing buildbod failure ppc64le-lld-multistage-test
Added:
Modified:
llvm/lib/Target/PowerPC/PPCGenScalarMASSEntries.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/PowerPC/PPCGenScalarMASSEntries.cpp b/llvm/lib/Target/PowerPC/PPCGenScalarMASSEntries.cpp
index 93b6d0f779378..00931b1f63b29 100644
--- a/llvm/lib/Target/PowerPC/PPCGenScalarMASSEntries.cpp
+++ b/llvm/lib/Target/PowerPC/PPCGenScalarMASSEntries.cpp
@@ -62,12 +62,20 @@ class PPCGenScalarMASSEntries : public ModulePass {
// Returns true if 'afn' flag exists on the call instruction with the math
// function
bool PPCGenScalarMASSEntries::isCandidateSafeToLower(const CallInst &CI) const {
+ // skip functions with no scalar or vector FP type (like cosisin)
+ if (!isa<FPMathOperator>(CI))
+ return false;
+
return CI.hasApproxFunc();
}
// Returns true if 'nnan', 'ninf' and 'nsz' flags exist on the call instruction
// with the math function
bool PPCGenScalarMASSEntries::isFiniteCallSafe(const CallInst &CI) const {
+ // skip functions with no scalar or vector FP type (like cosisin)
+ if (!isa<FPMathOperator>(CI))
+ return false;
+
// FIXME: no-errno and trapping-math need to be set for MASS converstion
// but they don't have IR representation.
return CI.hasNoNaNs() && CI.hasNoInfs() && CI.hasNoSignedZeros();
More information about the llvm-commits
mailing list