File tree Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -2005,7 +2005,7 @@ void GenSpecificPattern::visitCastInst(CastInst& I)
20052005 if ((srcVal = dyn_cast<Instruction>(srcVal->getOperand (0 ))))
20062006 {
20072007 // need fast math to know that we can ignore Nan
2008- if (srcVal->isFast ())
2008+ if (isa<FPMathOperator>(srcVal) && srcVal->isFast ())
20092009 {
20102010 IRBuilder<> builder (&I);
20112011 Function* func = Intrinsic::getDeclaration (
Original file line number Diff line number Diff line change @@ -289,3 +289,9 @@ LegalizeAction InstLegalChecker::visitLandingPadInst(LandingPadInst&) {
289289 // FIXME: Do we support it?
290290 return Legal;
291291}
292+
293+ #if LLVM_VERSION_MAJOR >= 10
294+ LegalizeAction InstLegalChecker::visitFNeg (llvm::UnaryOperator& I) {
295+ return Legal;
296+ }
297+ #endif
Original file line number Diff line number Diff line change @@ -110,6 +110,9 @@ namespace IGC {
110110 LegalizeAction visitExtractValueInst (ExtractValueInst& I);
111111 LegalizeAction visitInsertValueInst (InsertValueInst& I);
112112 LegalizeAction visitLandingPadInst (LandingPadInst&);
113+ #if LLVM_VERSION_MAJOR >= 10
114+ LegalizeAction visitFNeg (llvm::UnaryOperator& I);
115+ #endif
113116 };
114117
115118 } // End Legalizer namespace
You can’t perform that action at this time.
0 commit comments