InstCombine: Fold out nanless canonicalize pattern
Pattern match a wrapper around llvm.canonicalize which
weakens the semantics to not require quieting signaling
nans. Depending on the denormal mode and FP type, we can
either drop the pattern entirely or reduce it only to
a canonicalize call. I'm inventing this pattern to deal
with LLVM's lax canonicalization model in math library
code.
The math library code currently has explicit checks for
the denormal mode, and conditionally canonicalizes the
result if there is flushing. Semantically, this could be
directly replaced with a simple call to llvm.canonicalize,
but doing so would incur an additional cost when using
standard IEEE behavior. If we do not care about quieting
a signaling nan, this should be a no-op unless the denormal
mode may flush. This will allow replacement of the
conditional code with a zero cost abstraction utility
[17 lines not shown]
[OpenMP][flang] Fix crash in host offload
Guard `getGridValue` in `OMPIRBuilder` to avoid reaching the
`unreachable` in `getGridValue` when offloading to host device without
an explicit num_threads clause.
Reproducer (`-fopenmp -fopenmp-targets=x86_64-unknown-linux-gnu`):
```
program test
implicit none
!$omp target
!$omp end target
end program test
```
(Note: the linker still fails, but that's another issue.)
[clang][AST] Preserve qualifiers in getFullyQualifiedType for AutoType (#187717)
A previous change (86c4e96) did not preserve qualifiers attached to the
AutoType QualType when the type was deduced.
For an AutoType after `getDeducedType()`, qualifiers from the original
QualType were dropped. Preserve and reapply them to the deduced type.
libpkg: attempt config file merge for force install
Currently `pkg install -f` always overwrite config files.
This commit changes this behavior to attempt to merge them.
Sponsored by: The FreeBSD Foundation
libpkg: fix --register-only to populate config file contents
Currently `pkg install --register-only` does not acutally populate
config file contents in the pkg database. This leads to config files
potentially getting silently overwritten during upgrade/reinstall.
Sponsored by: The FreeBSD Foundation
tests: add failing test that should pass
pkg install --register-only followed by pkg install -f should
merge config files, but it currently does not.
Fixing this behavior will allow pkgbasify to be simpler and more robust.
Sponsored by: The FreeBSD Foundation