|  | Commit message (Collapse) | Author | Age | Files | Lines | 
|---|
| | 
| 
| 
| 
| 
| | That wasn't confusing /at all/...
llvm-svn: 192617 | 
| | 
| 
| 
| 
| 
| 
| 
| | The alignment of allocated space was wrong, see Bugzila 17345.
Done by Zvi Rackover <zvi.rackover@intel.com>.
llvm-svn: 192573 | 
| | 
| 
| 
| 
| 
| | (This is triggered by current lit tests)
llvm-svn: 192549 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | sse4.2 support.
This should fix the buildbots.
Original commit message:
[DAGCombiner] Slice a big load in two loads when the element are next to each
other in memory and the target has paired load and performs post-isel loads
combining.
E.g., this optimization will transform something like this:
a = load i64* addr
b = trunc i64 a to i32
c = lshr i64 a, 32
d = trunc i64 c to i32
into:
b = load i32* addr1
d = load i32* addr2
Where addr1 = addr2 +/- sizeof(i32), if the target supports paired load and
performs post-isel loads combining.
One should overload TargetLowering::hasPairedLoad to provide this information.
The default is false.
<rdar://problem/14477220>
llvm-svn: 192476 | 
| | 
| 
| 
| 
| 
| | on ubuntu.
llvm-svn: 192474 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | other in memory and the target has paired load and performs post-isel loads
combining.
E.g., this optimization will transform something like this:
 a = load i64* addr
 b = trunc i64 a to i32
 c = lshr i64 a, 32
 d = trunc i64 c to i32
into:
 b = load i32* addr1
 d = load i32* addr2
Where addr1 = addr2 +/- sizeof(i32), if the target supports paired load and
performs post-isel loads combining.
One should overload TargetLowering::hasPairedLoad to provide this information.
The default is false.
<rdar://problem/14477220>
llvm-svn: 192471 | 
| | 
| 
| 
| | llvm-svn: 192386 | 
| | 
| 
| 
| 
| 
| | assert got copy and pasted to many places.
llvm-svn: 192078 | 
| | 
| 
| 
| 
| 
| | of MoveChild, CheckSame, MoveParent. Saves 846 bytes from the X86 DAG isel matcher, ~300 from ARM, ~840 from Hexagon.
llvm-svn: 192026 | 
| | 
| 
| 
| 
| 
| 
| 
| | pointed to by a dbg_value belonging to a function argument is eliminated
during instruction selection.
rdar://problem/15094721.
llvm-svn: 192011 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | DAGCombiner::visitFP_EXTEND will apply the following transformation:
  fold (fpext (load x)) -> (fpext (fptrunc (extload x)))
but the implementation does not handle indexed loads (pre/post inc.), but did
not specifically ignore them either (unlike for extending loads, which it
already ignored), causing an assert when the transformation was applied to an
indexed load. This is the minimal fix for correctness (causing the
transformation to be skipped for indexed loads).
Unfortunately, I don't have an in-tree test case.
llvm-svn: 191989 | 
| | 
| 
| 
| | llvm-svn: 191941 | 
| | 
| 
| 
| 
| 
| | of MoveChild, CheckSame, MoveParent. Saves 846 bytes from the X86 DAG isel matcher, ~300 from ARM, ~840 from Hexagon.
llvm-svn: 191940 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | or not. The corresponding dag patterns are as following:
"DAGCombier::MatchRotate" function in DAGCombiner.cpp
Pattern1
// fold (or (shl (*ext x), (*ext y)),
//          (srl (*ext x), (*ext (sub 32, y)))) ->
//   (*ext (rotl x, y))
// fold (or (shl (*ext x), (*ext y)),
//          (srl (*ext x), (*ext (sub 32, y)))) ->
//   (*ext (rotr x, (sub 32, y)))
pattern2
// fold (or (shl (*ext x), (*ext (sub 32, y))),
//          (srl (*ext x), (*ext y))) ->
//   (*ext (rotl x, y))
// fold (or (shl (*ext x), (*ext (sub 32, y))),
//          (srl (*ext x), (*ext y))) ->
//   (*ext (rotr x, (sub 32, y)))
llvm-svn: 191905 | 
| | 
| 
| 
| 
| 
| | Patch by Alp Toker.
llvm-svn: 191757 | 
| | 
| 
| 
| | llvm-svn: 191724 | 
| | 
| 
| 
| 
| 
| 
| | SDNode destructors are never called. As an optimization use AtomicSDNode's
internal storage if we have a small number of operands.
llvm-svn: 191636 | 
| | 
| 
| 
| | llvm-svn: 191610 | 
| | 
| 
| 
| | llvm-svn: 191604 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | SelectionDAG will now attempt to inverse an illegal conditon in order to
find a legal one and if that doesn't work, it will attempt to swap the
operands using the inverted condition.
There are no new test cases for this, but a nubmer of the existing R600
tests hit this path.
llvm-svn: 191602 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | This is useful for targets like R600, which only support GT, GE, NE, and EQ
condition codes as it removes the need to handle unsupported condition
codes in target specific code.
There are no tests with this commit, but R600 has been updated to take
advantage of this new feature, so its existing selectcc tests are now
testing the swapped operands path.
llvm-svn: 191601 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | Interpreting the results of this function is not very intuitive, so I
cleaned it up to make it more clear whether or not a SETCC op was
legalized and how it was legalized (either by swapping LHS and RHS or
replacing with AND/OR).
This patch does change functionality in the LHS and RHS swapping case,
but unfortunately there are no in-tree tests for this.  However, this
patch is a prerequisite for R600 to take advantage of the LHS and RHS
swapping, so tests will be added in subsequent commits.
llvm-svn: 191600 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| | This change fixes the problem reported in pr17380 and re-add the dagcombine 
transformation ensuring that the value types are always legal if the 
transformation is triggered after Legalization took place.
Added the test case from pr17380.
llvm-svn: 191509 | 
| | 
| 
| 
| | llvm-svn: 191438 | 
| | 
| 
| 
| 
| 
| | Patch by Artyom Skrobov.
llvm-svn: 191428 | 
| | 
| 
| 
| | llvm-svn: 191423 | 
| | 
| 
| 
| | llvm-svn: 191422 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | (shl (zext (shr A, X)), X) => (zext (shl (shr A, X), X)).
The rule only triggers when there are no other uses of the
zext to avoid materializing more instructions.
This helps the DAGCombiner understand that the shl/shr
sequence can then be converted into an and instruction.
llvm-svn: 191393 | 
| | 
| 
| 
| 
| 
| | PR17338.
llvm-svn: 191337 | 
| | 
| 
| 
| 
| 
| | No functionality change, lots of indentation changes.
llvm-svn: 191303 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| | Patch by Ana Pazos.
1.Added support for v1ix and v1fx types.
2.Added Scalar Pairwise Reduce instructions.
3.Added initial implementation of Scalar Arithmetic instructions.
llvm-svn: 191263 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | sequence.
Sometimes a copy from a vreg -> vreg sneaks into the middle of a terminator
sequence. It is safe to slice this into the stack protector success bb.
This fixes PR16979.
llvm-svn: 191260 | 
| | 
| 
| 
| | llvm-svn: 191214 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | Previously, the DAGISel function WalkChainUsers was spotting that it
had entered already-selected territory by whether a node was a
MachineNode (amongst other things). Since it's fairly common practice
to insert MachineNodes during ISelLowering, this was not the correct
check.
Looking around, it seems that other nodes get their NodeId set to -1
upon selection, so this makes sure the same thing happens to all
MachineNodes and uses that characteristic to determine whether we
should stop looking for a loop during selection.
This should fix PR15840.
llvm-svn: 191165 | 
| | 
| 
| 
| 
| 
| 
| 
| | splitting too."
This reverts commit r191130.
llvm-svn: 191138 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | The Type Legalizer recognizes that VSELECT needs to be split, because the type
is to wide for the given target. The same does not always apply to SETCC,
because less space is required to encode the result of a comparison. As a result
VSELECT is split and SETCC is unrolled into scalar comparisons.
This commit fixes the issue by checking for VSELECT-SETCC patterns in the DAG
Combiner. If a matching pattern is found, then the result mask of SETCC is
promoted to the expected vector mask for the given target. This mask has usually
te same size as the VSELECT return type (except for Intel KNL). Now the type
legalizer will split both VSELECT and SETCC.
This allows the following X86 DAG Combine code to sucessfully detect the MIN/MAX
pattern. This fixes PR16695, PR17002, and <rdar://problem/14594431>.
llvm-svn: 191130 | 
| | 
| 
| 
| 
| 
| | These violations were introduced in r191049
llvm-svn: 191059 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | C-like languages promote types like unsigned short to unsigned int before
performing an arithmetic operation. Currently the rotate matcher in the
DAGCombiner does not consider this situation.
This commit extends the DAGCombiner in the way that the pattern
(or (shl ([az]ext x), (*ext y)), (srl ([az]ext x), (*ext (sub 32, y))))
is folded into
([az]ext (rotl x, y))
The matching is restricted to aext and zext because in this cases the upper
bits are either undefined or known. Test case is included.
This fixes PR16726.
llvm-svn: 191049 | 
| | 
| 
| 
| 
| 
| | There is a buildbot failure. Need to investigate this.
llvm-svn: 191048 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | C-like languages promote types like unsigned short to unsigned int before
performing an arithmetic operation. Currently the rotate matcher in the
DAGCombiner does not consider this situation.
This commit extends the DAGCombiner in the way that the pattern
(or (shl ([az]ext x), (*ext y)), (srl ([az]ext x), (*ext (sub 32, y))))
is folded into
([az]ext (rotl x, y))
The matching is restricted to aext and zext because in this cases the upper
bits are either undefined or known. Test case is included.
This fixes PR16726.
llvm-svn: 191045 | 
| | 
| 
| 
| 
| 
| 
| 
| | a power of 2 but differ in bit width.
PR17283.
llvm-svn: 191000 | 
| | 
| 
| 
| 
| 
| 
| 
| | Use the DIVariable::isIndirect() flag set by the frontend instead of
guessing whether to set the machine location's indirection bit.
Paired commit with CFE.
llvm-svn: 190961 | 
| | 
| 
| 
| | llvm-svn: 190866 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | When a truncate node defines a legal vector type but uses an illegal
vector type, the legalization process was splitting the vector until
<1 x vector> type, but then it was failing to scalarize the node because
it did not know how to handle TRUNCATE.
<rdar://problem/14989896>
llvm-svn: 190830 | 
| | 
| 
| 
| 
| 
| 
| | A DBG_VALUE is register-indirect iff the first operand is a register
_and_ the second operand is an immediate.
llvm-svn: 190821 | 
| | 
| 
| 
| 
| 
| 
| | DAGCombiner::isAlias can be called with SrcValue1 or SrcValue2 null, and we
can't use AA in this case (if we try, then the casting code in AA will assert).
llvm-svn: 190763 | 
| | 
| 
| 
| | llvm-svn: 190565 | 
| | 
| 
| 
| 
| 
| 
| | It works with clang, but GCC has different rules so we can't make all of those
hidden. This reverts commit r190534.
llvm-svn: 190536 | 
| | 
| 
| 
| 
| 
| | Worth 100k on a linux/x86_64 Release+Asserts clang.
llvm-svn: 190534 | 
| | 
| 
| 
| 
| 
| | No functional change.
llvm-svn: 190466 |