| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
mentioning all the relevant types in an initializer list. NFC
llvm-svn: 251500
|
|
|
|
|
|
| |
array. NFC
llvm-svn: 251494
|
|
|
|
|
|
|
|
| |
same type.
This also lets us remove the versions of the functions that took a statically sized array as we can rely on ArrayRef implicit conversion now.
llvm-svn: 251490
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
cntlz is the old POWER mnemonic. cntlzw is the PowerPC mnemonic.
This change fixes an issue when -no-integrated-as: The opcode cntlz is
unrecognized by gas
Alias the POWER mnemonic cntlz[.] to the PowerPC mnemonic cntlzw[.]
This is done for because the POWER cntlz mnemonic has be used by LLVM for
a very long time. We need to make sure that assembly programs
that are using the cntlz[.] do not break with this change.
Change PowerPC tests to reflect the insn change from cntlz to cntlzw.
Add assembly test to verify cntlz[.] is encoded correctly.
Patch by Tom Rix!
llvm-svn: 251489
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This recommits r250719, which caused a failure in SPEC2000.gcc
because of the incorrect insert point for the new wider load.
Convert two halfword loads into a single 32-bit word load with bitfield extract
instructions. For example :
ldrh w0, [x2]
ldrh w1, [x2, #2]
becomes
ldr w0, [x2]
ubfx w1, w0, #16, #16
and w0, w0, #ffff
llvm-svn: 251438
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
successors when optimization is disabled.
When optimization is disabled, edge weights that are stored in MBB won't be used so that we don't have to store them. Currently, this is done by adding successors with default weight 0, and if all successors have default weights, the weight list will be empty. But that the weight list is empty doesn't mean disabled optimization (as is stated several times in MachineBasicBlock.cpp): it may also mean all successors just have default weights.
We should discourage using default weights when adding successors, because it is very easy for users to forget update the correct edge weights instead of using default ones (one exception is that the MBB only has one successor). In order to detect such usages, it is better to differentiate using default weights from the case when optimizations is disabled.
In this patch, a new interface addSuccessorWithoutWeight(MBB*) is created for when optimization is disabled. In this case, MBB will try to maintain an empty weight list, but it cannot guarantee this as for many uses of addSuccessor() whether optimization is disabled or not is not checked. But it can guarantee that if optimization is enabled, then the weight list always has the same size of the successor list.
Differential revision: http://reviews.llvm.org/D13963
llvm-svn: 251429
|
|
|
|
|
|
|
|
| |
convert float to half with mask/maskz for the reg to reg version and mask for the reg to mem version (there is no maskz version for reg to mem).
Differential Revision: http://reviews.llvm.org/D14113
llvm-svn: 251409
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: After D13851 landed, we saw backend crashes when compiling the reduced test case included in this patch. The right fix seems to be to allow these vector types for expansion in instruction selection.
Reviewers: rengolin, t.p.northover
Subscribers: RKSimon, t.p.northover, aemerson, llvm-commits, rengolin
Differential Revision: http://reviews.llvm.org/D14082
llvm-svn: 251401
|
|
|
|
|
|
|
|
|
|
| |
GNU tools require elfiamcu to take up the entire OS field, so, e.g.
i?86-*-linux-elfiamcu is not considered a legal triple.
Make us compatible.
Differential Revision: http://reviews.llvm.org/D14081
llvm-svn: 251390
|
|
|
|
|
|
|
|
|
|
| |
nullptr instead of the index.
This avoid mentioning the table name an extra time and allows the lookup to be done directly in the ifs by relying on the bool conversion of the pointer.
While there make use of ArrayRef and std::find_if.
llvm-svn: 251382
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If we have an operand to a bitwise logic op that's already in
an XMM register and the result is going to be sent to an XMM
register, then use an SSE logic op to avoid moves between the
integer and vector register files.
Related commits:
http://reviews.llvm.org/rL248395
http://reviews.llvm.org/rL248399
http://reviews.llvm.org/rL248404
http://reviews.llvm.org/rL248409
http://reviews.llvm.org/rL248415
This should solve PR22428:
https://llvm.org/bugs/show_bug.cgi?id=22428
llvm-svn: 251378
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Previously we maintained two separate switch statements that had to be kept in
sync. This patch merges them into a single switch.
Reviewers: vkalintiris
Subscribers: llvm-commits, dsanders
Differential Revision: http://reviews.llvm.org/D14012
llvm-svn: 251369
|
|
|
|
|
|
|
|
|
| |
This is a preliminary step before adding another optimization
to PerformBITCASTCombine().
..and I really hope it's NFC this time!
llvm-svn: 251357
|
|
|
|
|
|
|
| |
Both VLDRS and VLDRD fault if the memory is not 4 byte aligned, which wasn't
really being checked before, leading to faults at runtime.
llvm-svn: 251352
|
|
|
|
| |
llvm-svn: 251350
|
|
|
|
|
|
|
| |
This is a preliminary step before adding another optimization
to PerformBITCASTCombine().
llvm-svn: 251349
|
|
|
|
|
|
|
| |
Unbreaks linking with gold, which cannot resolve direct relocations referring
to global symbols.
llvm-svn: 251342
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Android libc provides a fixed TLS slot for the unsafe stack pointer,
and this change implements direct access to that slot on AArch64 via
__builtin_thread_pointer() + offset.
This change also moves more code into TargetLowering and its
target-specific subclasses to get rid of target-specific codegen
in SafeStackPass.
This change does not touch the ARM backend because ARM lowers
builting_thread_pointer as aeabi_read_tp, which is not available
on Android.
The previous iteration of this change was reverted in r250461. This
version leaves the generic, compiler-rt based implementation in
SafeStack.cpp instead of moving it to TargetLoweringBase in order to
allow testing without a TargetMachine.
llvm-svn: 251324
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In PIC mode we were previously computing global variable addresses (or GOT
entry addresses) by adding the PC, the PC-relative GOT displacement and
the GOT-relative symbol/GOT entry displacement. Because the latter two
displacements are fixed, we ended up performing one more addition than
necessary.
This change causes us to compute addresses using a single PC-relative
displacement, resulting in a shorter code sequence. This reduces code size
by about 4% in a recent build of Chromium for Android.
As a result of this change we no longer need to compute the GOT base address
in the ARM backend, which allows us to remove the Global Base Reg pass and
SDAG lowering for the GOT.
We also now no longer use the GOT when addressing a symbol which is known
to be defined in the same linkage unit. Specifically, the symbol must have
either hidden visibility or a strong definition in the current module in
order to not use the the GOT.
This is a change from the previous behaviour where we would use the GOT to
address externally visible symbols defined in the same module. I think the
only cases where this could matter are cases involving symbol interposition,
but we don't really support that well anyway.
Differential Revision: http://reviews.llvm.org/D13650
llvm-svn: 251322
|
|
|
|
|
|
|
| |
Discovered by testing int-cmp-44.ll with -verify-machineinstrs (added to
test run).
llvm-svn: 251299
|
|
|
|
|
|
|
| |
Discovered by running fp-move-05.ll with -verify-machineinstrs (added
to test case run).
llvm-svn: 251298
|
|
|
|
|
|
|
| |
Discovered by running fp-cmp-02.ll with -verify-machineinstrs (now added
to test run).
llvm-svn: 251297
|
|
|
|
|
|
|
|
| |
Discovered by testing fp-add-02.ll with -verify-machineinstrs.
Test case updated to always run with -verify-machineinstrs.
llvm-svn: 251296
|
|
|
|
|
|
|
|
| |
Instead of XFAIL-ing the tests with the wrong usage of the "interrupt"
attribute, we should check that we emit the correct error messages to
the user.
llvm-svn: 251295
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D13896
llvm-svn: 251287
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This patch adds support for using the "interrupt" attribute on Mips
for interrupt handling functions. At this time only mips32r2+ with the
o32 ABI with the static relocation model is supported. Unsupported
configurations will be rejected
Patch by Simon Dardis (+ clang-format & some trivial changes to follow the
LLVM coding standards by me).
Reviewers: mpf, dsanders
Subscribers: dsanders, vkalintiris, llvm-commits
Differential Revision: http://reviews.llvm.org/D10768
llvm-svn: 251286
|
|
|
|
|
|
|
|
| |
Bug https://llvm.org/bugs/show_bug.cgi?id=25318
Differential Revision: http://reviews.llvm.org/D14062
llvm-svn: 251285
|
|
|
|
|
|
| |
This means "memory with offset" and requires very little plumbing to get working. This fixes PR25317.
llvm-svn: 251280
|
|
|
|
| |
llvm-svn: 251278
|
|
|
|
|
|
|
|
|
|
| |
Otherwise value can be reused , despite its value could be changed - produces incorrect assembler.
https://llvm.org/bugs/show_bug.cgi?id=25270
Differential Revision: http://reviews.llvm.org/D14057
llvm-svn: 251275
|
|
|
|
|
|
|
|
|
|
| |
We didn't validate that the .word directive was given a sane value,
leading to crashes when we attempt to write out the object file.
Instead, perform some validation and issue a diagnostic pointing at the
start of the diagnostic.
llvm-svn: 251270
|
|
|
|
| |
llvm-svn: 251266
|
|
|
|
|
|
| |
Incorrect range test - found during fuzz testing.
llvm-svn: 251245
|
|
|
|
|
|
|
|
|
|
| |
When the target does not support these intrinsics they should be converted to a chain of scalar load or store operations.
If the mask is not constant, the scalarizer will build a chain of conditional basic blocks.
I added isLegalMaskedGather() isLegalMaskedScatter() APIs.
Differential Revision: http://reviews.llvm.org/D13722
llvm-svn: 251237
|
|
|
|
|
|
|
|
|
|
|
|
| |
When using the MCU psABI, compiler-generated library calls should pass
some parameters in-register. However, since inreg marking for x86 is currently
done by the front end, it will not be applied to backend-generated calls.
This is a workaround for PR3997, which describes a similar issue for -mregparm.
Differential Revision: http://reviews.llvm.org/D13977
llvm-svn: 251223
|
|
|
|
|
|
|
|
| |
This adds support for the i?86-*-elfiamcu triple, which indicates the IAMCU psABI is used.
Differential Revision: http://reviews.llvm.org/D13977
llvm-svn: 251222
|
|
|
|
| |
llvm-svn: 251219
|
|
|
|
| |
llvm-svn: 251217
|
|
|
|
|
|
| |
Most 128-bit and 256-bit shuffles were manually matching UNPCK patterns - use lowerVectorShuffleWithUNPCK to be more thorough.
llvm-svn: 251211
|
|
|
|
|
|
| |
Use isShuffleEquivalent to match UNPCK shuffles - better support for build vector inputs.
llvm-svn: 251207
|
|
|
|
|
|
| |
array rather than pointer and size. NFC
llvm-svn: 251196
|
|
|
|
|
|
|
|
|
| |
This enables tail calls with thiscall, stdcall, vectorcall and
fastcall functions.
Differential Revision: http://reviews.llvm.org/D13999
llvm-svn: 251190
|
|
|
|
| |
llvm-svn: 251189
|
|
|
|
|
|
|
|
|
|
| |
This patch adds support for lowering to the XOP VPROT / VPROTI vector bit rotation instructions.
This has required changes to the DAGCombiner rotation pattern matching to support vector types - so far I've only changed it to support splat vectors, but generalising this further is feasible in the future.
Differential Revision: http://reviews.llvm.org/D13851
llvm-svn: 251188
|
|
|
|
| |
llvm-svn: 251160
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The logic here isn't straightforward because our support for
TargetOptions::GuaranteedTailCallOpt.
Also fix a bug where we were allowing tail calls to cdecl functions from
fastcall and vectorcall functions. We were special casing thiscall and
stdcall callers rather than checking for any convention that requires
clearing stack arguments before returning.
Reviewers: hans
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D14024
llvm-svn: 251137
|
|
|
|
| |
llvm-svn: 251132
|
|
|
|
| |
llvm-svn: 251125
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
saved registers
Summary:
When ARMFrameLowering::emitPopInst generates a "pop" instruction to restore the callee saved registers, it checks if the LR register is among them. If so, the function may decide to remove the basic block's terminator and replace it with a "pop" to the PC register instead of LR.
This leads to a problem when the block's terminator is preceded by a "llvm.debugtrap" call. The MI iterator points to the trap in such a case, which is also a terminator. If the function decides to restore LR to PC, it erroneously removes the trap.
Reviewers: asl, rengolin
Subscribers: aemerson, jfb, rengolin, dschuff, llvm-commits
Differential Revision: http://reviews.llvm.org/D13672
llvm-svn: 251123
|
|
|
|
| |
llvm-svn: 251122
|