[flang][OpenMP] Move leftover functions from structure to loop, NFC
There were some loop-related functions still left in the
check-omp-structure.cpp file. Move them to check-omp-loop.cpp.
[PowerPC][SDAG] fix bitcast on ppc_f128 swapping the two halves (#208969)
fixes https://github.com/llvm/llvm-project/issues/44482
This is a long-standing issue
https://github.com/llvm/llvm-project/issues/44482, you can also see the
discrepancy in this small C program compiled with clang and GCC
https://godbolt.org/z/KK1q1EozM.
The representation of ppc_fp128 is endian-agnostic in that its
high-order double is stored at the lower address.
For example, 27.0 is represented in memory as `[0x403b000000000000,
0x0000000000000000]`. Bitcasting these 128 bits as an i128 on
little-endian means the upper 64 bits are `0x0000000000000000`, the
lower are `0x403b000000000000`.
But on big-endian the interpretation of the bytes is flipped, the upper
bits are now `0x403b000000000000` while the lower are in
[8 lines not shown]
[orc-rt] Use the Error matchers in InProcessControllerAccessTest (#228702)
Use the Error matchers introduced in 4c8a437d0487 in place of cantFail
on calls that can fail, so that a failure is reported as a test failure
rather than aborting the test binary (or, with assertions disabled,
going unnoticed).
[Mips][MSA] Lower vector fabs to BCLRI (#228532)
FMAX_A selects an original operand by magnitude and preserves its sign,
so fmax_a(x, x) does not implement fabs. Expand FABS_W and FABS_D to
clear bit 31 and bit 63 with BCLRI, and update their scheduling to match
the bit-clear instructions.
Fixes #228384.
[Mips][MSA] Fix commutability of unordered comparisons (#228567)
Remove IsCommutable from FCULT_W/D and FCULE_W/D, whose predicates are
directional. Extend the existing floating-point comparison tests to
check that reversed comparisons produce separate results.
Fixes: #228422
[orc-rt] Use the Error matchers in OptionParserTest (#228701)
Use the Error matchers introduced in 4c8a437d0487 to clean up error
checks in OptionParserTest.
[X86] Don't skip frame setup/destroy on SEH pseudos and regenerate tests (#225445)
As in title. Skipping setting setup/destroy flags caused pseudos to be
wrongly reordered by scheduling
[Support] Add assert for DataBytes in calculateReflectedCRC32 (#228688)
Add an assertion to calculateReflectedCRC32 to check DataBytes is one of
the expected value (1, 2, 4, or 8 bytes).
Co-authored-by: Jared Wyles <jared.wyles at gmail.com>
[flang] Plugin directives: address review comments
- Accept as procedure arguments only subprograms and external procedures:
reject dummy procedures, procedure pointers, statement functions and
intrinsics; a generic name stands for its specific procedure of the same
name, and is an error without one. Accept as variable arguments only
variables (not e.g. derived types or module names). Lowering no longer
calls mangleName on anything else, which aborted.
- Make a malformed argument list of a directive with a registered prefix a
parse error instead of an ignored, unrecognized directive.
- Leave out of a module file a directive whose arguments are not visible in
the module (e.g. an internal procedure or a dummy argument), with a
warning, instead of writing a module file that cannot be read.
- In a function without a RESULT clause, take its name as the function, not
its result variable, where a procedure may be meant.
- Record a directive on the host's symbol when its subject is host
associated (a module procedure naming itself), so it is written to the
module file.
Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
[orc-rt] Use the Error matchers in SimplePackedSerializationTest (#228696)
Use the Error matchers introduced in 4c8a437d0487 to clean up error
checks in SimplePackedSerializationTest.
[ARM] fix `r14` aliasing `lr` on `thumb-1` (#225746)
Since https://github.com/llvm/llvm-project/pull/179740 `r14` is accepted
as an alias for `lr`, which works on `arm` and `thumb-2` targets, but
not on `thumb-1`
https://godbolt.org/z/WEEjMMj93
```llvm
; -mtriple=thumbv6m-none-eabi
define i32 @read_r14() nounwind {
start:
%1 = tail call i32 asm sideeffect alignstack "", "=&{r14},~{cc},~{memory}"()
ret i32 %1
}
```
Gives
[11 lines not shown]
[SLP]Pack unique consecutive loads instead of gathering duplicated lanes
A load bundle with duplicated lanes whose unique loads are consecutive
was kept as is and emitted as a masked gather. Pack the unique loads
into a single wide load plus a reuse shuffle, unless the target reports
the masked gather as cheaper.
Reviewers:
Pull Request: https://github.com/llvm/llvm-project/pull/228698
[IRBuilder] Use SetInsertPoint without redundant BasicBlock argument (#228476)
Replace calls of `SetInsertPoint(BB, It)` with just
`SetInsertPoint(It)`. In preparation for deprecating that overload.
CodeGen: Prefer getting the Triple from the Module (#228620)
Take the triple from the contextual module rather than TargetMachine
when it's already readily available.
Co-authored-by: Claude Opus 5 <noreply at anthropic.com>
[clang] Refactor CRC32 helper for x86 CRC builtins (#225774)
Move the reflected CRC32 calculation used by the x86 CRC builtins into
llvm::calculateReflectedCRC32() and reuse it from both the AST
interpreter and constant expression evaluator.
This removes duplicated CRC32 implementation logic from Clang. This is
planned to be used for implementing const folding CRC instructions for
x86 and AArch64 in the future in LLVM.
Based on suggestion in
https://github.com/llvm/llvm-project/pull/219452#discussion_r4070846498
[orc-rt] Use the Error matchers in AllocActionTest (#228680)
Use the Error matchers introduced in 4c8a437d0487 to clean up error
checks in AllocActionTest.
CodeGen: Prefer getting the Triple from the Module
Continue replacing TargetMachine::getTargetTriple() with the module's
triple at sites where a Module is one hop away through an available
Function, GlobalValue or MachineModuleInfo.
Where the surrounding class already holds a Subtarget, use its triple
rather than routing through the Module.
Co-authored-by: Claude Opus 5 <noreply at anthropic.com>
CodeGen: Prefer getting the Triple from the Module
Take the triple from the contextual module rather than TargetMachine
when it's already readily available.
Co-authored-by: Claude Opus 5 <noreply at anthropic.com>
[Flang][OpenMP] Reset REQUIRES directive with new program unit (#227829)
A REQUIRES directive with unified_address, unified_shared_memory, or
reverse_offload must appear lexically before any device construct or
device routine is scoped to a program unit.
CodeGen: Prefer getting the Triple from the Module when convenient (#228429)
Take the triple from the contextual module rather than TargetMachine when it's
already readily available.
[orc-rt] Use the Error matchers in StandaloneMachOUnwindInfoRegistrar… (#228679)
…Test
Use the Error matchers introduced in 4c8a437d0487 to clean up error
checks in StandaloneMachOUnwindInfoRegistrarTest.
ARM: Preserve the dead flag when activating the optional CPSR def (#227655)
This did not preserve the original dead flag, so it would be recomputed later by
LiveVariables or RegAllocFast.
Co-authored-by: Claude Opus 5 <noreply at anthropic.com>
[orc-rt] Use the Error matchers in SimpleRemoteCATest (#228672)
Use the Error matchers introduced in 4c8a437d0487 to clean up error
checks in SimpleRemoteCATest.