| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
post-increment circular register stores, and bit reversed post-increment stores.
llvm-svn: 224957
|
|
|
|
|
|
| |
form stores with tests.
llvm-svn: 224952
|
|
|
|
|
|
| |
have encoding bits.
llvm-svn: 224951
|
|
|
|
| |
llvm-svn: 224950
|
|
|
|
|
|
| |
classes and instruction defs.
llvm-svn: 224949
|
|
|
|
|
|
| |
Patch by Michael Neumann.
llvm-svn: 224936
|
|
|
|
|
|
| |
-mtriple=x86_64-unknown to satisfy x64.
llvm-svn: 224907
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The else case ResultReg was not checked for validity.
To my surprise, this case was not hit in any of the
existing test cases. This includes a new test cases
that tests this path.
Also drop the `target triple` declaration from the
original test as suggested by H.J. Lu, because
apparently with it the test won't be run on Linux
llvm-svn: 224901
|
|
|
|
|
|
|
|
| |
Adds missing memory instruction variants to AVX false dependency breaking handling. (SSE was handled in r224246)
Differential Revision: http://reviews.llvm.org/D6780
llvm-svn: 224900
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
@llvm.cttz/ctlz.
If the control flow is modelling an if-statement where the only instruction in
the 'then' basic block (excluding the terminator) is a call to cttz/ctlz,
CodeGenPrepare can try to speculate the cttz/ctlz call and simplify the control
flow graph.
Example:
\code
entry:
%cmp = icmp eq i64 %val, 0
br i1 %cmp, label %end.bb, label %then.bb
then.bb:
%c = tail call i64 @llvm.cttz.i64(i64 %val, i1 true)
br label %end.bb
end.bb:
%cond = phi i64 [ %c, %then.bb ], [ 64, %entry]
\code
In this example, basic block %then.bb is taken if value %val is not zero.
Also, the phi node in %end.bb would propagate the size-of in bits of %val
only if %val is equal to zero.
With this patch, CodeGenPrepare will try to hoist the call to cttz from %then.bb
into basic block %entry only if cttz is cheap to speculate for the target.
Added two new hooks in TargetLowering.h to let targets customize the behavior
(i.e. decide whether it is cheap or not to speculate calls to cttz/ctlz). The
two new methods are 'isCheapToSpeculateCtlz' and 'isCheapToSpeculateCttz'.
By default, both methods return 'false'.
On X86, method 'isCheapToSpeculateCtlz' returns true only if the target has
LZCNT. Method 'isCheapToSpeculateCttz' only returns true if the target has BMI.
Differential Revision: http://reviews.llvm.org/D6728
llvm-svn: 224899
|
|
|
|
|
|
|
|
| |
Masked vector intrinsics are a part of common LLVM IR, but they are really supported on AVX2 and AVX-512 targets. I added a code that translates masked intrinsic for all other targets. The masked vector intrinsic is converted to a chain of scalar operations inside conditional basic blocks.
http://reviews.llvm.org/D6436
llvm-svn: 224897
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Determining the address of a TLS variable results in a function call in
certain TLS models. This means that a simple ICmpInst might actually
result in invalidating the CTR register.
In such cases, do not attempt to rely on the CTR register for loop
optimization purposes.
This fixes PR22034.
Differential Revision: http://reviews.llvm.org/D6786
llvm-svn: 224890
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Consider the following IR:
%3 = load i8* undef
%4 = trunc i8 %3 to i1
%5 = call %jl_value_t.0* @foo(..., i1 %4, ...)
ret %jl_value_t.0* %5
Bools (that are the result of direct truncs) are lowered as whatever
the argument to the trunc was and a "and 1", causing the part of the
MBB responsible for this argument to look something like this:
%vreg8<def,tied1> = AND8ri %vreg7<kill,tied0>, 1, %EFLAGS<imp-def>; GR8:%vreg8,%vreg7
Later, when the load is lowered, it will insert
%vreg15<def> = MOV8rm %vreg14, 1, %noreg, 0, %noreg; mem:LD1[undef] GR8:%vreg15 GR64:%vreg14
but remember to (at the end of isel) replace vreg7 by vreg15. Now for
the bug. In fast isel lowering, we mistakenly mark vreg8 as the result
of the load instead of the trunc. This adds a fixup to have
vreg8 replaced by whatever the result of the load is as well, so
we end up with
%vreg15<def,tied1> = AND8ri %vreg15<kill,tied0>, 1, %EFLAGS<imp-def>; GR8:%vreg15
which is an SSA violation and causes problems later down the road.
This fixes PR21557.
Test Plan: Test test case from PR21557 is added to the test suite.
Reviewers: ributzka
Reviewed By: ributzka
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6245
llvm-svn: 224884
|
|
|
|
| |
llvm-svn: 224872
|
|
|
|
| |
llvm-svn: 224871
|
|
|
|
| |
llvm-svn: 224870
|
|
|
|
| |
llvm-svn: 224869
|
|
|
|
|
|
| |
unused classes.
llvm-svn: 224868
|
|
|
|
| |
llvm-svn: 224867
|
|
|
|
| |
llvm-svn: 224866
|
|
|
|
| |
llvm-svn: 224864
|
|
|
|
|
|
| |
references to them.
llvm-svn: 224862
|
|
|
|
|
|
| |
Similar fix to not fail to disassembler CR9-CR15 references.
llvm-svn: 224861
|
|
|
|
|
|
| |
enabled on Windows
llvm-svn: 224860
|
|
|
|
| |
llvm-svn: 224859
|
|
|
|
|
|
|
| |
A multiply cannot unsigned wrap if there are bitwidth, or more, leading
zero bits between the two operands.
llvm-svn: 224849
|
|
|
|
|
|
|
| |
We already utilize this logic for reducing overflow intrinsics, it makes
sense to reuse it for normal multiplies as well.
llvm-svn: 224847
|
|
|
|
|
|
| |
instructions. Instead of rejecting we'll just generate the _alt forms that don't try to alter the mnemonic. While I'm here, merge some common code in the Instruction printers for the condition code replacement and fix the mask on SSE to be 3-bits instead of 4.
llvm-svn: 224846
|
|
|
|
|
|
|
|
|
|
|
| |
When materializing constant i1 values, they must be zero extended. We represent
i1 values as [0, 1], not [0, -1], in i32 registers. As it turns out, this code
path was dead for i1 values prior to r216006 (which is why this did not manifest in
miscompiles until recently).
Fixes -O0 self-hosting on PPC64/Linux.
llvm-svn: 224842
|
|
|
|
|
|
|
| |
No functional changes.
The documentation is coming.
llvm-svn: 224829
|
|
|
|
|
|
|
| |
It's possible to have a prior definition of a symbol in module asm.
Raise an error instead of crashing.
llvm-svn: 224828
|
|
|
|
| |
llvm-svn: 224827
|
|
|
|
|
|
|
|
|
| |
.set directives may be overridden by other .set directives as well as
label definitions.
This fixes PR22019.
llvm-svn: 224811
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Correct the line information generation for preprocessed assembly. Although we
tracked the source information for the macro instantiation, we failed to account
for the fact that we were instantiating a macro, which is populated into a new
buffer and that the line information would be relative to the definition rather
than the actual instantiation location. This could cause the line number
associated with the statement to be very high due to wrapping of the difference
calculated for the preprocessor line information emitted into the stream.
Properly calculate the line for the macro instantiation, referencing the line
where the macro is actually used as GCC/gas do.
The test case uses x86, though the same problem exists on any other target using
the LLVM IAS.
llvm-svn: 224810
|
|
|
|
| |
llvm-svn: 224808
|
|
|
|
|
|
| |
This finishes the fix partially applied by r224782.
llvm-svn: 224802
|
|
|
|
|
|
|
|
|
| |
Patch by Ramkumar Ramachandra <artagnon@gmail.com>.
Also remove Llvm_executionengine.get_pointer_to_global, as it
is actually deprecated and didn't appear in a stable release.
llvm-svn: 224801
|
|
|
|
|
|
|
| |
of a DW_TAG_ptr_to_member_type.
This restores the behavior from before r224780-r224781.
llvm-svn: 224799
|
|
|
|
| |
llvm-svn: 224792
|
|
|
|
|
|
| |
coverage for the entire process as a single bit set, and if coverage_bitset=1 actually emit that bitset
llvm-svn: 224789
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On non-Darwin PPC64, the TOC reload needs to come directly after the bctrl
instruction (for indirect calls) because the 'bctrl/ld 2, 40(1)' instruction
sequence is interpreted by the unwinding code in libgcc. To make sure these
occur as a pair, as with other pairings interpreted by the linker, fuse the two
instructions into one instruction (for code generation only).
In the future, we might wish to do this by emitting CFI directives instead,
but this solution is simpler, and mirrors what GCC does. Additional discussion
on this point is contained in the PR.
Fixes PR22015.
llvm-svn: 224788
|
|
|
|
| |
llvm-svn: 224787
|
|
|
|
| |
llvm-svn: 224786
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D5204
llvm-svn: 224785
|
|
|
|
| |
llvm-svn: 224783
|
|
|
|
|
|
| |
Fixes pr21901.
llvm-svn: 224782
|
|
|
|
| |
llvm-svn: 224775
|
|
|
|
| |
llvm-svn: 224774
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D6416
llvm-svn: 224771
|
|
|
|
|
|
|
|
|
|
|
|
| |
computeKnownBits()
GlobalAlias handling used to be after GlobalValue handling, which meant it was, in practice, dead code. r220165 moved GlobalAlias handling to be before GlobalValue handling, but also moved it to be before the max depth check, causing an assert due to a recursion depth limit violation.
This moves GlobalAlias handling forward to where it's safe, and changes the GlobalValue handling to only look at GlobalObjects.
Differential Revision: http://reviews.llvm.org/D6758
llvm-svn: 224765
|