Please merge the following into 4.0.1: https://reviews.llvm.org/rL292188 https://reviews.llvm.org/rL292246 The former is a fix for bug 32494 (and possibly others), the latter a follow-up fix to eliminate MSVC warnings.
Is this OK to merge?
Davide or Eli, are these patches OK for the 4.0.1 branch?
This has been in tree for a while, and it seems to be useful to the FreeBSD folks. I think it's OK to merge this to 4.0.1 in some form. The cons is that this is a large patch that could itself introduce other regressions, so if there's a way to backport a subset of it (the one that fixes the FreeBSD crash, that would be better). Backporting the MSVC warning fix seems a no-brainer to me (assuming the other patch gets backported).
Dimitry, is there a specific bug this patch fixes? I agree that it would be nice to merge a subset of this patch if possible.
(In reply to Tom Stellard from comment #4) > Dimitry, is there a specific bug this patch fixes? I agree that it would be > nice to merge a subset of this patch if possible. Yes, bug 32494, as mentioned in the description. Basically, this fixes 'Assertion failed: (isa<FPMathOperator>(this) && "getting fast-math flag on invalid op"), function hasUnsafeAlgebra, file /usr/ports/devel/llvm40/work/llvm-4.0.0.src/lib/IR/Instruction.cpp, line 165.'
Even though it crashes in the log1p bultin, the fact that the code is a conftest.c generated by autoconf makes me wonder if this is a generic bug that would potentially affected all builtins, or if the log1p case is special. Are you able to patch 4.0.0 with only the log1p fix from this patch and see if you hit any other failures?
Created attachment 18510 [details] log1p Fix Here is the patch with only the log1p fix. Can you try this?
(In reply to Tom Stellard from comment #7) > Created attachment 18510 [details] > log1p Fix > > Here is the patch with only the log1p fix. Can you try this? Yes, that works indeed, for the specific case of log1p. Should be fine for 4.0.1.
Merged: r303992