If both operands can't be zero or nan, the result can't be nan.
Details
Diff Detail
Event Timeline
llvm/lib/Analysis/ValueTracking.cpp | ||
---|---|---|
4477–4485 | Add TODO to check correct pairs? E.g. nofpclass(inf nan zero) fmul nofpclass(nan) should be fine, right? We need inf on one side and zero on the other. Also, can you please remind me what happens if we multiply a denormal with flush to zero semantics with inf? Does that become inf or nan? |
Could you please also add test coverage for the denormal handling?
llvm/lib/Analysis/ValueTracking.cpp | ||
---|---|---|
4468 | Don't we also need to pass in fcSubnormal as well for these? |
I did but somehow it's not in the diff
llvm/lib/Analysis/ValueTracking.cpp | ||
---|---|---|
4468 | It's not strictly necessary since we're not really making use of these hints yet |
LGTM
llvm/lib/Analysis/ValueTracking.cpp | ||
---|---|---|
4468 | Even if it's not used yet, we should include it so it continues working in the future... Or just drop the argument entirely. |
Don't we also need to pass in fcSubnormal as well for these?