| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
Patch by Dave Estes <cestes@codeaurora.org>
http://reviews.llvm.org/D3769
llvm-svn: 209001
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ldr x1, [x0, #64]
add x0, x0, #64
->
ldr x1, [x0], #64
is not a valid transformation, the correct transformation (and what the code actually does) is:
ldr x1, [x0, #64]
add x0, x0, #64
->
ldr x1, [x0, #64]!
llvm-svn: 208998
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit r208934.
The patch depends on aliases to GEPs with non zero offsets. That is not
supported and fairly broken.
The good news is that GlobalAlias is being redesigned and will have support
for offsets, so this patch should be a nice match for it.
llvm-svn: 208978
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
TableGen has a fairly dubious heuristic to decide whether an alias should be
printed: does the alias have lest operands than the real instruction. This is
bad enough (particularly with no way to override it), but it should at least be
calculated consistently for both strings.
This patch implements that logic: first get the *correct* string for the
variant, in the same way as the Matcher, without guessing; then count the
number of whitespace chars.
There are basically 4 changes this brings about after the previous
commits; all of these appear to be good, so I have changed the tests:
+ ARM64: we print "neg X, Y" instead of "sub X, xzr, Y".
+ ARM64: we skip implicit "uxtx" and "uxtw" modifiers.
+ Sparc: we print "mov A, B" instead of "or %g0, A, B".
+ Sparc: we print "fcmpX A, B" instead of "fcmpX %fcc0, A, B"
llvm-svn: 208969
|
| |
|
|
|
|
|
|
|
| |
The canonical syntax is "fcmXY ..., #0.0".
This will be tested when the TableGen "should I print this Alias" heuristic is
fixed (very soon).
llvm-svn: 208968
|
| |
|
|
|
|
|
|
|
|
| |
You can perform (say) an fcmle operation by swapping the operands on an fcmge,
but it shouldn't be printed like that.
This will be tested when the TableGen "should I print this Alias" heuristic is
fixed (very soon).
llvm-svn: 208961
|
| |
|
|
|
|
|
|
|
|
| |
We accept "ldr w3, [x1, #-1]" as a convenience, but we should still print the
canonical "ldur" form.
This will be tested when the TableGen "should I print this Alias" heuristic is
fixed (very soon).
llvm-svn: 208960
|
| |
|
|
|
|
|
|
|
|
| |
If an ANDS instruction has Rd == ZR it should be printed as TST since
its only effect is on the flags register NZCV.
This will be tested when the TableGen "should I print this Alias"
heuristic is fixed (very soon).
llvm-svn: 208959
|
| |
|
|
|
|
|
|
|
| |
MOV is almost always the right thing to print if possile. People understand it.
This will be tested when the TableGen "should I print this Alias" heuristic is
fixed (very soon).
llvm-svn: 208958
|
| |
|
|
|
|
|
|
|
|
| |
For example, the full instruction "sub w0, wzr, w1, uxtw" could print as either
"neg w0, w1" or "sub w0, wzr, w1". The former is better.
This will be tested when the TableGen "should I print this Alias" heuristic is
fixed (very soon).
llvm-svn: 208957
|
| |
|
|
|
|
|
|
|
|
| |
You can write "lslv w0, w1, w2" (probably for legacy reasons), but it should be
printed as simply "lsl".
This will be tested when the TableGen "should I print this Alias" heuristic is
fixed (very soon).
llvm-svn: 208956
|
| |
|
|
| |
llvm-svn: 208955
|
| |
|
|
|
|
|
|
|
|
|
| |
This commit implements two command line switches -global-merge-on-external
and -global-merge-aligned, and both of them are false by default, so this
optimization is disabled by default for all targets.
For ARM64, some back-end behaviors need to be tuned to get this optimization
further enabled.
llvm-svn: 208934
|
| |
|
|
| |
llvm-svn: 208902
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, TableGen assumed that every aliased operand consumed precisely 1
MachineInstr slot (this was reasonable because until a couple of days ago,
nothing more complicated was eligible for printing).
This allows a couple more ARM64 aliases to print so we can remove the special
code.
On the X86 side, I've gone for explicit AT&T size specifiers as the default, so
turned off a few of the aliases that would have just started printing.
llvm-svn: 208880
|
| |
|
|
|
|
|
|
| |
In all cases, if a "mov" alias exists, it is the canonical form of the
instruction. Now that TableGen can support aliases containing syntax variants,
we can enable them and improve the quality of the asm output.
llvm-svn: 208874
|
| |
|
|
|
|
|
| |
To get at least one use of the change (and some actual tests) in with its
commit, I've enabled the AArch64 & ARM64 NEON mov aliases.
llvm-svn: 208867
|
| |
|
|
|
|
|
|
|
| |
Previously, we ignored the difference between V64 and V128 when parsing
assembly: they both got mapped to registers in the FPR128 class. This is
basically harmless at the moment because they both print and encode the same
way. However, it will affect the printing of aliases.
llvm-svn: 208866
|
| |
|
|
| |
llvm-svn: 208864
|
| |
|
|
| |
llvm-svn: 208863
|
| |
|
|
| |
llvm-svn: 208862
|
| |
|
|
|
|
| |
emitted
llvm-svn: 208861
|
| |
|
|
| |
llvm-svn: 208860
|
| |
|
|
| |
llvm-svn: 208839
|
| |
|
|
|
|
| |
argument stack from callee.
llvm-svn: 208837
|
| |
|
|
|
|
| |
inappropriate since it lost its Mask parameter in r154011.
llvm-svn: 208811
|
| |
|
|
|
|
| |
Reviewed at http://reviews.llvm.org/D3741
llvm-svn: 208792
|
| |
|
|
|
|
|
| |
Now that TableGen handles aliases, these are unneeded. Hopefully more will be
able to go soon.
llvm-svn: 208781
|
| |
|
|
|
|
|
|
|
| |
addressing mode.
A vague diagnostic replaced the misleading one.
This can fix bug 19502.
llvm-svn: 208669
|
| |
|
|
|
|
|
|
|
|
|
| |
Normally, patterns like (add x, (setcc cc ...)) will be folded into
(csel x, x+1, not cc). However, if there is a ZEXT after SETCC, they
won't be folded. This patch recognizes the ZEXT and allows the
generation of CSINC.
This patch fixes bug 19680.
llvm-svn: 208660
|
| |
|
|
| |
llvm-svn: 208607
|
| |
|
|
| |
llvm-svn: 208606
|
| |
|
|
|
|
|
|
| |
This is a slightly different approach to AArch64 (the base instruction
definitions aren't quite right for that to work), but achieves the
same thing and reduces C++ hackery in AsmParser.
llvm-svn: 208605
|
| |
|
|
|
|
|
| |
If this code triggers, any immediate has already been validated so it can't
possibly trigger a diagnostic.
llvm-svn: 208564
|
| |
|
|
|
|
|
|
| |
In terms of assembly, these have too much overlap to be neatly modelled as
disjoint classes: in many cases "lsl" is an acceptable alternative to either
"uxtw" or "uxtx".
llvm-svn: 208563
|
| |
|
|
| |
llvm-svn: 208540
|
| |
|
|
|
|
|
|
| |
Unfortunately, since ARM64 models all these instructions as aliases,
the checks need to be done at the time the alias is seen rather than
during instruction validation as AArch64 does it.
llvm-svn: 208529
|
| |
|
|
| |
llvm-svn: 208528
|
| |
|
|
|
|
| |
diagnostics
llvm-svn: 208527
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
We must validate the value type in TLI::getRegisterByName, because if we
don't and the wrong type was used with the IR intrinsic, then we'll assert
(because we won't be able to find a valid register class with which to
construct the requested copy operation). For PPC64, additionally, the type
information is necessary to decide between the 64-bit register and the 32-bit
subregister.
No functionality change.
llvm-svn: 208508
|
| |
|
|
|
|
| |
No functionality change intended.
llvm-svn: 208507
|
| |
|
|
|
|
|
|
|
|
| |
We were swapping the true & false results while testing for FMAX/FMIN,
but not putting them back to the original state if the later checks
failed.
Should fix PR19700.
llvm-svn: 208469
|
| |
|
|
|
|
| |
ARM64 backend was missing a required_library entry.
llvm-svn: 208437
|
| |
|
|
| |
llvm-svn: 208330
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The parsing of ADD/SUB shifted immediates needs to be done explicitly so
that better diagnostics can be emitted, as a side effect this also
removes some of the hacks in the current method of handling this operand
type.
Additionally remove manual CMP aliasing to ADD/SUB and use InstAlias
instead.
llvm-svn: 208329
|
| |
|
|
|
|
| |
Also emit a more useful diagnostic when they are not.
llvm-svn: 208318
|
| |
|
|
| |
llvm-svn: 208317
|
| |
|
|
|
|
|
|
| |
big endian calls.
SelectionDAG already knows about this, but fast-isel was ignorant.
llvm-svn: 208307
|
| |
|
|
|
|
| |
We need to use a temporary register for a 2-step operation like REM.
llvm-svn: 208297
|
| |
|
|
|
|
| |
ARM64 backend.
llvm-svn: 208284
|