Page MenuHomePhabricator

Please use GitHub pull requests for new patches. Phabricator shutdown timeline

scanon (Steve Canon)
User

Projects

User does not belong to any projects.

User Details

User Since
Jun 10 2014, 9:32 AM (486 w, 13 h)

Recent Activity

Oct 5 2022

scanon added inline comments to D135011: Add builtin_elementwise_sin and builtin_elementwise_cos.
Oct 5 2022, 8:25 AM · Restricted Project, Restricted Project

Oct 4 2022

scanon accepted D131787: [builtins] Fix __floattitf and __floatuntitf on x86.
Oct 4 2022, 6:20 PM · Restricted Project, Restricted Project

Sep 7 2022

scanon added a comment to D113779: [Clang] Add mfp16, mfp16fml and mdotprod flags for ARM target features..

Wearing my compiler user hat, I would much rather use additive -mfeature than have to specify these as -march+feature, even when using a build system that nominally handles this stuff, because I frequently want to be able to compile one specific file with "whatever the prevailing options are, but also enable this one feature." Most build systems make this possible somehow (track down the arch variable, append +feature to it, etc), but it's considerably simpler if you can just append -mfeature to the list of flags and call it a day.

Sep 7 2022, 6:02 AM · Restricted Project, Restricted Project

Aug 11 2022

scanon added a comment to D129231: [Builtins] Do not claim all libfuncs are readnone with trapping math..

In any event, from the standpoint of the C(23) language, these operations do not set inexact, so I believe that it is appropriate to optimize them as if they do not set inexact.

Aug 11 2022, 8:50 AM · Restricted Project, Restricted Project
scanon added a comment to D129231: [Builtins] Do not claim all libfuncs are readnone with trapping math..

Looking at implementations of these functions, it looks like GNU libm doesn't raise inexact, but the bionic libm does. I think I'm leaning towards marking all of them as "fng" as it's the more cautious of the two.

Hmm, bionic's behavior sounds a bit surprising. In the committed version, I kept them fnc to keep the previous behavior for now. I'll double-check with @scanon and potentially upload a follow-up patch.

Aug 11 2022, 8:49 AM · Restricted Project, Restricted Project

Aug 8 2022

scanon added a comment to D129231: [Builtins] Do not claim all libfuncs are readnone with trapping math..

The CFP working group and C23 have since clarified this in Annex F:

Aug 8 2022, 8:56 AM · Restricted Project, Restricted Project

Aug 5 2022

scanon added inline comments to D129231: [Builtins] Do not claim all libfuncs are readnone with trapping math..
Aug 5 2022, 1:12 PM · Restricted Project, Restricted Project

Feb 25 2022

scanon added a comment to D120395: [X86] Prohibit arithmetic operations on type `__bfloat16`.

There's a lot of churn around proposed "solutions" on this and related PR, but not a very clear analysis of what the problem we're trying to solve is.

Feb 25 2022, 2:20 PM · Restricted Project, Restricted Project, Restricted Project

Jan 17 2022

scanon added a comment to D117480: [IR] Extend llvm.vector.reduce.fadd.

I assume ordered here means sequential. The clang builtin specifies a tree-wise reduction order.

Jan 17 2022, 8:06 AM · Restricted Project, Restricted Project

Oct 19 2021

scanon accepted D111986: [Clang] Add elementwise abs builtin..

Two minor questions, but also LGTM as is.

Oct 19 2021, 1:02 PM · Restricted Project
scanon added a comment to D111986: [Clang] Add elementwise abs builtin..

What's the rationale for making abs undefined on the minimum value? AFAIK every actual simd implementation defines the result and they agree (and even if one didn't, it would be pretty easy to get the "right" result. Introducing UB here just seems like punishing users for no reason.

Oct 19 2021, 7:46 AM · Restricted Project

Oct 13 2021

scanon accepted D111529: Specify Clang vector builtins..

I'm happy with this now.

Oct 13 2021, 1:50 PM · Restricted Project

Oct 11 2021

scanon added inline comments to D111529: Specify Clang vector builtins..
Oct 11 2021, 7:41 AM · Restricted Project
scanon added inline comments to D111529: Specify Clang vector builtins..
Oct 11 2021, 7:40 AM · Restricted Project
scanon added inline comments to D111529: Specify Clang vector builtins..
Oct 11 2021, 7:39 AM · Restricted Project

May 14 2021

scanon added inline comments to D102494: [Clang,Driver] Default to Darwin_libsystem_m veclib on iOS based targets..
May 14 2021, 9:58 AM · Restricted Project, Restricted Project

Mar 10 2021

scanon added a comment to D97854: [RFC][nsan] A Floating-point numerical sanitizer..

Is there a mechanism to instruct the sanitizer to ignore a specific expression or function? From a cursory reading, I am mildly concerned about a deluge of false positives from primitives that compute exact (or approximate) residuals; these are acting to eliminate or precisely control floating-point errors, but tend to show up as "unstable" in a naive analysis that isn't aware of them.

Mar 10 2021, 8:51 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project

Nov 19 2020

scanon accepted D90174: [HIP] Fix regressions due to fp contract change.

I'm fine with this.

Nov 19 2020, 8:44 AM · Restricted Project

Nov 10 2020

scanon added a comment to D90174: [HIP] Fix regressions due to fp contract change.

Strictly speaking, fp-contract=fast probably should have been a separate flag entirely (since there's no _expression_ being contracted in fast). Unfortunately, that ship has sailed, and it does constrain our ability to choose an accurate name somewhat.

Nov 10 2020, 6:28 PM · Restricted Project

Nov 5 2020

scanon added a comment to D90174: [HIP] Fix regressions due to fp contract change.

I do not much like faststd, as there's nothing "standard" about it. I do not, however, have a better suggestion off the top of my head. Let's pause and consider the name a little bit longer, please?

Nov 5 2020, 1:26 PM · Restricted Project

Nov 3 2020

scanon added a comment to D90174: [HIP] Fix regressions due to fp contract change.

(If you tell GCC to respect the pragma via -std=c17 or similar, then -ffp-contract=fast overrides it just like clang's current behavior: https://godbolt.org/z/5dxxGb)

Nov 3 2020, 10:25 AM · Restricted Project
scanon added a comment to D90174: [HIP] Fix regressions due to fp contract change.

GCC doesn't respect the pragma, so "what other compilers do" is not a particularly useful metric.

Nov 3 2020, 10:23 AM · Restricted Project

Oct 19 2020

scanon added a comment to D89699: [ExtVector] Make .even/.odd/.lo/.hi return vectors for single elements..

I guess the counterargument here would be that .x does not produce an extvector(1), and there is at least a plausible argument that .x should be the same as .lo for a two-element vector. I'm not really convinced by this, but it's not totally outrageous.

Oct 19 2020, 9:35 AM · Restricted Project
scanon added a comment to D89699: [ExtVector] Make .even/.odd/.lo/.hi return vectors for single elements..

I'm fairly certain that this will cause some breaks internally at Apple, but I'm also pretty sure that it's a step in the right direction, and we should just sign up to fix any issues it causes.

Oct 19 2020, 9:31 AM · Restricted Project

Sep 17 2020

scanon added a comment to D87835: [APFloat] prevent NaN morphing into Inf on conversion (PR43907).

If we can do it without complication, it would be best to preserve signaling-ness, because that's the more faithful interpretation of IEEE 754 (even though it _doesn't_ match what the HW does, because the HW can signal and APFloat can't). A general principle (imperfectly adhered to) of IEEE 754 is that conversions on signaling NaNs should _either_ signal and produce a quiet NaN (if possible), or should produce a signaling NaN if no signal is possible.

Sep 17 2020, 11:41 AM · Restricted Project

Aug 31 2020

scanon added inline comments to D85031: [builtins] Unify the softfloat division implementation.
Aug 31 2020, 6:54 AM · Restricted Project

May 12 2020

scanon added a comment to D72841: Add support for pragma float_control, to control precision and exception behavior at the source level.

Prior to this change contract was never generated in the case of in-statement contraction only, instead clang was emitting llvm.fmuladd to inform the backend that only those were eligible for contraction. From a correctness perspective I think this was perfectly fine.

Currently I don't see any logic to generate "blocking intrinsics" (I guess to define a region around the instructions emitted for the given statement). Until such mechanism is in place, I think that generating the contract fast-math flag also for in-statement contraction is wrong because it breaks the original program semantic.

May 12 2020, 10:43 AM · Restricted Project, Restricted Project

May 6 2020

scanon added a comment to D78827: Add support for #pragma clang fp reassociate(on|off) -- floating point control of associative math transformations.

TS18661-5 is quite vague on what the intended semantics for the pragma are.

May 6 2020, 2:09 PM · Restricted Project

May 5 2020

scanon added a comment to D78827: Add support for #pragma clang fp reassociate(on|off) -- floating point control of associative math transformations.

(Please get one additional sign off before committing; I'm mainly signing off on the numerics model aspect).

May 5 2020, 6:22 PM · Restricted Project
scanon accepted D78827: Add support for #pragma clang fp reassociate(on|off) -- floating point control of associative math transformations.

My concerns have been addressed. Thanks for bearing with me, Melanie!

May 5 2020, 6:22 PM · Restricted Project
scanon added a comment to D78827: Add support for #pragma clang fp reassociate(on|off) -- floating point control of associative math transformations.

I don't think the C standard is likely to ever bless reassociative FP math with an expression-local restriction. Steve, do you actually think that would be a useful optimization mode?

May 5 2020, 11:20 AM · Restricted Project

May 4 2020

scanon added inline comments to D78827: Add support for #pragma clang fp reassociate(on|off) -- floating point control of associative math transformations.
May 4 2020, 12:53 PM · Restricted Project
scanon added inline comments to D78827: Add support for #pragma clang fp reassociate(on|off) -- floating point control of associative math transformations.
May 4 2020, 11:48 AM · Restricted Project

Apr 27 2020

scanon added inline comments to D78190: Add Bfloat IR type.
Apr 27 2020, 10:11 AM · Restricted Project, Restricted Project

Apr 23 2020

scanon requested changes to D78190: Add Bfloat IR type.
Apr 23 2020, 4:20 PM · Restricted Project, Restricted Project

Mar 10 2020

scanon accepted D75246: Make IEEEFloat::roundToIntegral more standard conformant.
Mar 10 2020, 9:12 AM · Restricted Project

Mar 9 2020

scanon added inline comments to D75246: Make IEEEFloat::roundToIntegral more standard conformant.
Mar 9 2020, 10:46 AM · Restricted Project
scanon requested changes to D75246: Make IEEEFloat::roundToIntegral more standard conformant.
Mar 9 2020, 10:46 AM · Restricted Project

Feb 7 2020

scanon added inline comments to D74183: [IRGen] Add an alignment attribute to underaligned sret parameters.
Feb 7 2020, 8:18 AM · Restricted Project

Dec 4 2019

scanon added inline comments to D69878: Consoldiate internal denormal flushing controls.
Dec 4 2019, 5:38 AM · Restricted Project

Nov 20 2019

scanon added inline comments to D63061: [builtins] Fix overflow issue for complex division with big numbers.
Nov 20 2019, 6:46 AM · Restricted Project, Restricted Project
scanon requested changes to D63061: [builtins] Fix overflow issue for complex division with big numbers.
Nov 20 2019, 6:11 AM · Restricted Project, Restricted Project

Sep 25 2019

scanon added a comment to D67999: Fix `compiler_rt_logbf_test.c` test failure for Builtins-i386-darwin test suite..

Backing up what everyone says here: logb doesn't define the sign of NaN results, and 754 explicitly says not to interpret the sign of NaN as having any meaning except in the copySign, absoluteValue, negate, and copy operations. (That's a semantically meaningless statement, since those operations do not exist in a vacuum, which means that you can't actually say anything about the sign of NaN from a formal perspective, but, well, it's the standard we have.)

Sep 25 2019, 11:19 AM · Restricted Project, Restricted Project

Sep 5 2019

scanon accepted D67248: [InstCombine] pow(x, +/- 0.0) -> 1.0.

"pow(x, ±0) returns 1 for any x, even a NaN"

Sep 5 2019, 5:51 PM · Restricted Project

Sep 4 2019

scanon accepted D66836: [libc++] Add `__truncating_cast` for safely casting float types to integers.

I believe that the code can still be simplified somewhat, but that it's correct as-is for float, double, and long double. I'll take an AI to follow-up on future improvements, and let's get this in.

Sep 4 2019, 5:29 AM · Restricted Project

Aug 28 2019

scanon added a comment to D66836: [libc++] Add `__truncating_cast` for safely casting float types to integers.
Aug 28 2019, 2:11 PM · Restricted Project
scanon added a comment to D66836: [libc++] Add `__truncating_cast` for safely casting float types to integers.

Eric showed me this link https://godbolt.org/z/AjBHYqv

Aug 28 2019, 1:48 PM · Restricted Project
scanon requested changes to D66836: [libc++] Add `__truncating_cast` for safely casting float types to integers.
Aug 28 2019, 12:41 PM · Restricted Project
scanon added inline comments to D66836: [libc++] Add `__truncating_cast` for safely casting float types to integers.
Aug 28 2019, 12:36 PM · Restricted Project
scanon added inline comments to D66836: [libc++] Add `__truncating_cast` for safely casting float types to integers.
Aug 28 2019, 8:59 AM · Restricted Project
scanon added a comment to D66836: [libc++] Add `__truncating_cast` for safely casting float types to integers.

I would tend to write this function in the following form:

// set up lower bound and upper bound
if (r > upperBound) r = upperBound;
if (!(r >= lowerBound)) r = lowerBound; // NaN is mapped to l.b.
return static_cast<IntType>(r);

I prefer to avoid the explicit trunc call, since that's the defined behavior of the static_cast once the value is in-range, anyway.

Aug 28 2019, 8:54 AM · Restricted Project

Aug 8 2019

scanon added inline comments to D65303: [BPI] Adjust the probability for floating point unordered comparison.
Aug 8 2019, 9:04 AM · Restricted Project
scanon added a comment to D65303: [BPI] Adjust the probability for floating point unordered comparison.

It's not that NaN is rare in normal programs, or that it indicates a bug in the code. It's that testing for NaN is usually an indication that you're testing for an exceptional case, and it makes sense to move those off the hot path (i.e. NaN is actually pretty common, but the likelihood of handling it on the normal-value path through code is small).

Aug 8 2019, 9:04 AM · Restricted Project

Aug 6 2019

scanon added a comment to D65753: Builtins: Add some v2f16 variants.

(Ideally we would just call them e.g. __builtin_floor, but that would be source-breaking. __builtin_tgmath_floor seems like a good compromise.)

Aug 6 2019, 1:03 PM · Restricted Project
scanon added a comment to D65753: Builtins: Add some v2f16 variants.

Strongly agree with what @rjmccall said. If we can make these generic builtins instead of ending up with O(100) variants of each math operation, that would make life immensely nicer.

Aug 6 2019, 1:03 PM · Restricted Project

Jul 26 2019

scanon requested changes to D65303: [BPI] Adjust the probability for floating point unordered comparison.
Jul 26 2019, 6:33 AM · Restricted Project

Jul 24 2019

scanon accepted D65235: CrashHandler: be careful about crashing while handling.

LGTM

Jul 24 2019, 12:03 PM · Restricted Project

Jul 22 2019

scanon requested changes to D54749: Saturating float to int casts..

Reviewers: what do we need to get this across the finish line?

Jul 22 2019, 1:28 PM · Restricted Project

Jul 16 2019

scanon accepted D64666: [Sema] Enable -Wimplicit-int-float-conversion for integral to floating point precision loss.

LGTM. Please get at least one additional reviewer's approval before merging, as this is a corner of clang that I don't work on often.

Jul 16 2019, 10:53 AM · Restricted Project, Restricted Project

Jul 15 2019

scanon requested changes to D64666: [Sema] Enable -Wimplicit-int-float-conversion for integral to floating point precision loss.
Jul 15 2019, 10:50 AM · Restricted Project, Restricted Project

May 30 2019

scanon accepted D62708: Fix the predefined exponent limit macros for the 16-bit IEEE format..
May 30 2019, 5:43 PM · Restricted Project

Mar 11 2019

scanon accepted D59070: [builtins] Divide shouldn't underflow if rounded result would be normal..

Ah, now I see what you're talking about. And in fact, because of the way divide works out, there's a little gap of results that are even possible to achieve just below each binade boundary, so the code you have here will work out fine. We *should* add a comment to clarify this somewhat, but I'm happy to do that in a separate commit. LGTM.

Mar 11 2019, 5:21 PM · Restricted Project, Restricted Project
scanon added a comment to D59070: [builtins] Divide shouldn't underflow if rounded result would be normal..

These results *are* tiny in the before rounding sense.

Mar 11 2019, 4:53 PM · Restricted Project, Restricted Project
scanon requested changes to D59070: [builtins] Divide shouldn't underflow if rounded result would be normal..

In the parlance of IEEE 754, there are two ways to "detect tininess": "before rounding" and "after rounding". The standard doesn't define how to flush subnormal results, but in practice most HW flushes results that are "tiny". The existing code flushes as though tininess is detected before rounding. This proposed update flushes as though tininess were detected after rounding.

Mar 11 2019, 4:37 PM · Restricted Project, Restricted Project

Jan 25 2019

scanon updated subscribers of D57188: Disable _Float16 for non ARM/SPIR Targets.

do we want to support _Float16 anywhere else?

ARM is the only in-tree target with a defined ABI that I'm aware of.

Jan 25 2019, 9:30 AM · Restricted Project

Jan 11 2019

scanon added a reviewer for D56596: Enable fma formation for fp16 on x86 and aarch64: ahatanak.
Jan 11 2019, 5:50 AM
scanon created D56596: Enable fma formation for fp16 on x86 and aarch64.
Jan 11 2019, 5:48 AM

Dec 17 2018

scanon added a comment to D55531: AsmParser: test .double NaN.

Can you also add a check for .double infinity? It looks like that's likely missing too.

Dec 17 2018, 10:44 AM
scanon accepted D55531: AsmParser: test .double NaN.

Shrug. OK.

Dec 17 2018, 10:40 AM

Dec 7 2018

scanon requested changes to D48342: [libcxx] Optimize vectors construction of trivial types from an iterator range with const-ness mismatch..
Dec 7 2018, 12:05 PM
scanon added inline comments to D48342: [libcxx] Optimize vectors construction of trivial types from an iterator range with const-ness mismatch..
Dec 7 2018, 12:04 PM

Oct 9 2018

scanon added a comment to D53004: [WebAssembly] Saturating float to int intrinsics.

Are these documented anywhere? I haven't seen it in any of the patches so far. What do they return for NaN inputs?

Oct 9 2018, 9:53 AM

Oct 3 2018

scanon added inline comments to D52835: [Diagnostics] Check integer to floating point number implicit conversions.
Oct 3 2018, 12:40 PM

Sep 24 2018

scanon added a comment to D49514: [compiler-rt] [builtins] Add logb/logbf/logbl methods to compiler-rt to avoid libm dependencies when possible..

I suspect that we'd rather use ilogb in the long term, but as a like-for-like replacement this looks OK.

Sep 24 2018, 10:12 AM

Jul 19 2018

scanon committed rL337523: Add x86_64-unkown triple to llc for x86 test..
Add x86_64-unkown triple to llc for x86 test.
Jul 19 2018, 8:56 PM
scanon committed rL337506: Skip out of SimplifyDemandedBits for BITCAST of f16 to i16.
Skip out of SimplifyDemandedBits for BITCAST of f16 to i16
Jul 19 2018, 3:51 PM
scanon closed D49524: Avoid generating FGETSIGN for f16.
Jul 19 2018, 3:51 PM
scanon added inline comments to D49561: AMDGPU: Try to make isKnownNeverSNan more accurate.
Jul 19 2018, 2:42 PM
scanon added inline comments to D49561: AMDGPU: Try to make isKnownNeverSNan more accurate.
Jul 19 2018, 2:41 PM
scanon added a comment to D49524: Avoid generating FGETSIGN for f16.
In D49524#1168723, @ab wrote:

I wouldn't be surprised if it failed on some target that can't even handle half parameters

Jul 19 2018, 1:47 PM

Jul 18 2018

scanon updated the diff for D49524: Avoid generating FGETSIGN for f16.
Jul 18 2018, 5:22 PM
scanon created D49524: Avoid generating FGETSIGN for f16.
Jul 18 2018, 4:59 PM

May 22 2018

scanon requested changes to D46926: [Fixed Point Arithmetic] Conversion between Fixed Point and Floating Point Numbers.

IIRC the optimization of divide-by-power-of-two --> multiply-by-inverse does not occur at -O0, so it would be better to multiply by 2^(-fbits) instead.

May 22 2018, 7:06 AM · Restricted Project

May 10 2018

scanon accepted D46499: [Support] Add docs for 'openFileFor{Write,Read}'.

LGTM, thanks!

May 10 2018, 2:19 PM

May 9 2018

scanon added a comment to D46499: [Support] Add docs for 'openFileFor{Write,Read}'.

One more question: the caller is responsible for closing the file when they're done, right?

May 9 2018, 8:57 AM
scanon added a comment to D46499: [Support] Add docs for 'openFileFor{Write,Read}'.

Two quick notes as someone who has never used these functions:

  • Name is really the *path* of the file to open, right?
  • What happens to ResultFD if the function fails?
May 9 2018, 8:52 AM

May 8 2018

scanon accepted D41868: APFloat/x87: Fix string conversion for "unnormal" values (pr35860).

LGTM

May 8 2018, 8:34 AM

May 4 2018

scanon added a comment to D46042: Cap vector alignment at 16 for all Darwin platforms.
In D46042#1088044, @ab wrote:

So, this makes sense to me, but on x86, should we also be worried about the fact that the calling convention is based on which features are available? (>128bit ext_vector_types are passed in AVX/AVX-512 registers, if available). Presumably swift is also affected, no?

May 4 2018, 10:50 AM

Apr 26 2018

scanon added a comment to D46135: [Driver, CodeGen] add options to enable/disable an FP cast optimization.

I like Chandler's wording. Something like:

Apr 26 2018, 1:51 PM

Apr 25 2018

scanon updated subscribers of D30527: Replacing float with new class Fraction for LSR alternative way of resolving complex solution.

@gottesmm can you take a look at this? You're more familiar with the APFloat API than I am.

Apr 25 2018, 7:28 AM · Restricted Project

Apr 20 2018

scanon added a comment to rL330437: [DAGCombine] (float)((int) f) --> ftrunc (PR36617).

Tangential question: Do we have an intrinsic floating -> integer conversion with defined semantics for out-of-range values?

Apr 20 2018, 8:43 AM

Apr 6 2018

scanon added a comment to D45336: Apply accumulator to fadd/fmul experimental vector reductions (PR36734).

it should really be the default in both LLVM and source languages except where there's an explicit constraint that forces linear reduction.

Tree reductions is what Rust portable packed SIMD RFC [0] currently specifies.

Apr 6 2018, 10:06 AM · Restricted Project
scanon added a comment to D45336: Apply accumulator to fadd/fmul experimental vector reductions (PR36734).

I also wonder whether requiring fast-math to allow tree reductions is overkill. Tree reductions can be implemented reasonably efficiently in many architectures, while linearly ordered reduction appear to me to be more of a niche.

Apr 6 2018, 8:19 AM · Restricted Project

Mar 26 2018

scanon added a comment to D44909: [DAGCombine] (float)((int) f) --> ftrunc (PR36617).

Two questions, to which I do not know the answer:

(a) Are the semantics of ISD::FP_TO_[US]INT for out-of-range values specified anywhere? The do not seem to be, but maybe I'm just missing it.

No, I don't see anything either. We just have:

/// FP_TO_[US]INT - Convert a floating point value to a signed or unsigned
/// integer.

I was assuming these nodes follow the same rules as the IR instructions since they are mapped 1-to-1 in SelectionDAGBuilder::visitFPToSI() etc.

Mar 26 2018, 5:36 PM
scanon added a comment to D44909: [DAGCombine] (float)((int) f) --> ftrunc (PR36617).

Two questions, to which I do not know the answer:

Mar 26 2018, 5:08 PM
scanon added a comment to D44909: [DAGCombine] (float)((int) f) --> ftrunc (PR36617).

This is the class of optimizations that I would call "formally allowed by the standard, but extremely likely to break things and surprise people." Which isn't to say that we shouldn't do it, just ... be prepared.

Mar 26 2018, 2:57 PM

Mar 20 2018

scanon accepted D44318: [LangRef] describe the default FP environment.

I'm OK with this.

Mar 20 2018, 8:08 AM

Mar 16 2018

scanon added inline comments to D44521: [InstSimplify] fp_binop X, NaN --> NaN.
Mar 16 2018, 9:37 AM

Mar 5 2018

scanon added a comment to D43765: [InstSimplify] loosen FMF for sqrt(X) * sqrt(X) --> X.

IIRC Intrinsic::sqrt is undef for negative inputs (unlike the sqrt libcall), so we don't need FMF.noNaNs to license this transformation.

Mar 5 2018, 8:56 AM

Mar 2 2018

scanon accepted D44038: [InstCombine] Rewrite the binary op shrinking in visitFPTrunc to avoid creating overly small ConstantFPs that we'll just need to extend again..

Works for me.

Mar 2 2018, 12:07 PM