Skip to content

Commit cef9fa0

Browse files
committed
Add warning on using fp-contract on x86
1 parent c8ce070 commit cef9fa0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

llvm/tools/llc/llc.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -604,6 +604,12 @@ static int compileModule(char **argv, LLVMContext &Context,
604604
InputFilename);
605605
}
606606

607+
if (TheTriple.isX86() &&
608+
codegen::getFuseFPOps() != FPOpFusion::FPOpFusionMode::Standard)
609+
WithColor::warning(errs(), argv[0])
610+
<< "X86 backend ignores --fp-contract setting; use IR fast-math "
611+
"flags instead.";
612+
607613
Options.BinutilsVersion =
608614
TargetMachine::parseBinutilsVersion(BinutilsVersion);
609615
Options.MCOptions.ShowMCEncoding = ShowMCEncoding;

0 commit comments

Comments
 (0)