|  | Commit message (Collapse) | Author | Age | Files | Lines | 
|---|
| ... |  | 
| | 
| 
| 
| 
| 
| | legalizer may call us with an overly large type.
llvm-svn: 162101 | 
| | 
| 
| 
| 
| 
| | various rounding modes.  Use this to implement SelectionDAG constant folding of FFLOOR, FCEIL, and FTRUNC.
llvm-svn: 161807 | 
| | 
| 
| 
| 
| 
| 
| | handle the cases where the memory value type was illegal. 
PR 13111. 
llvm-svn: 161565 | 
| | 
| 
| 
| 
| 
| 
| | This adds support for TargetIndex operands during isel. The meaning of
these (index, offset, flags) operands is entirely defined by the target.
llvm-svn: 161453 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| | This patch is mostly just refactoring a bunch of copy-and-pasted code, but
it also adds a check that the call instructions are readnone or readonly.
That check was already present for sin, cos, sqrt, log2, and exp2 calls, but
it was missing for the rest of the builtins being handled in this code.
llvm-svn: 161282 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | The previous change caused fast isel to not attempt handling any calls to
builtin functions.  That included things like "printf" and caused some
noticable regressions in compile time.  I wanted to avoid having fast isel
keep a separate list of functions that had to be kept in sync with what the
code in SelectionDAGBuilder.cpp was handling.  I've resolved that here by
moving the list into TargetLibraryInfo.  This is somewhat redundant in
SelectionDAGBuilder but it will ensure that we keep things consistent.
llvm-svn: 161263 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| | I noticed that SelectionDAGBuilder::visitCall was missing a check for memcmp
in TargetLibraryInfo, so that it would use custom code for memcmp calls even
with -fno-builtin.  I also had to add a new -disable-simplify-libcalls option
to llc so that I could write a test for this.
llvm-svn: 161262 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| | Fast isel doesn't currently have support for translating builtin function
calls to target instructions.  For embedded environments where the library
functions are not available, this is a matter of correctness and not
just optimization.  Most of this patch is just arranging to make the
TargetLibraryInfo available in fast isel.  <rdar://problem/12008746>
llvm-svn: 161232 | 
| | 
| 
| 
| | llvm-svn: 161110 | 
| | 
| 
| 
| | llvm-svn: 161061 | 
| | 
| 
| 
| 
| 
| | to do so.
llvm-svn: 161053 | 
| | 
| 
| 
| 
| 
| | loads from different x86 segments but the same address would get CSEd
llvm-svn: 160987 | 
| | 
| 
| 
| | llvm-svn: 160791 | 
| | 
| 
| 
| 
| 
| | release builds from crashing if code uses an intrinsic with an illegal type.
llvm-svn: 160661 | 
| | 
| 
| 
| | llvm-svn: 160621 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| | that do not support it (X86 does not lower select_cc).
PR: 13428
Together with Michael Kuperstein <michael.m.kuperstein@intel.com>
llvm-svn: 160619 | 
| | 
| 
| 
| | llvm-svn: 160617 | 
| | 
| 
| 
| 
| 
| | release builds from crashing if code uses an intrinsic with an illegal type. For instance 256-bit AVX intrinsics without having AVX enabled.
llvm-svn: 160616 | 
| | 
| 
| 
| 
| 
| | No functionality change.
llvm-svn: 160501 | 
| | 
| 
| 
| | llvm-svn: 160493 | 
| | 
| 
| 
| | llvm-svn: 160475 | 
| | 
| 
| 
| | llvm-svn: 160411 | 
| | 
| 
| 
| 
| 
| | instcombine transformation.
llvm-svn: 160387 | 
| | 
| 
| 
| | llvm-svn: 160372 | 
| | 
| 
| 
| 
| 
| 
| | When truncating a result of a vector that is split we need
to use the result of the split vector, and not re-split the dead node.
llvm-svn: 160357 | 
| | 
| 
| 
| | llvm-svn: 160354 | 
| | 
| 
| 
| | llvm-svn: 160350 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | large immediates. Add dag combine logic to recover in case the large
immediates doesn't fit in cmp immediate operand field.
int foo(unsigned long l) {
  return (l>> 47) == 1;
}
we produce
  %shr.mask = and i64 %l, -140737488355328
  %cmp = icmp eq i64 %shr.mask, 140737488355328
  %conv = zext i1 %cmp to i32
  ret i32 %conv
which codegens to
movq    $0xffff800000000000,%rax
andq    %rdi,%rax
movq    $0x0000800000000000,%rcx
cmpq    %rcx,%rax
sete    %al
movzbl    %al,%eax
ret
TargetLowering::SimplifySetCC would transform
(X & -256) == 256 -> (X >> 8) == 1
if the immediate fails the isLegalICmpImmediate() test. For x86,
that's immediates which are not a signed 32-bit immediate.
Based on a patch by Eli Friedman.
PR10328
rdar://9758774
llvm-svn: 160346 | 
| | 
| 
| 
| | llvm-svn: 160311 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | AssertZext value.
In the added testcase the constant 55 was behind an AssertZext of type i1, and ComputeDemandedBits
reported that some of the bits were both known to be one and known to be zero.
Together with Michael Kuperstein <michael.m.kuperstein@intel.com>
llvm-svn: 160305 | 
| | 
| 
| 
| 
| 
| 
| 
| | wider than the output element type. Make sure to trunc them if needed.
Together with Michael Kuperstein <michael.m.kuperstein@intel.com>
llvm-svn: 160235 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| | Add a micro-optimization to getNode of CONCAT_VECTORS when both operands are undefs.
Can't find a testcase for this because VECTOR_SHUFFLE already handles undef operands, but Duncan suggested that we add this.
Together with Michael Kuperstein <michael.m.kuperstein@intel.com>
llvm-svn: 160229 | 
| | 
| 
| 
| 
| 
| 
| 
| | single undef.
The unoptimized concat_vectors isd prevented the canonicalization of the vector_shuffle node.
llvm-svn: 160221 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| | When dumping the DAG for a fatal 'Cannot select' back-end error, also
provide the name of the function the construct is in. Useful when dealing
with large testcases, as the next step is to llvm-extract the function
in question to get a small(er) testcase.
llvm-svn: 160152 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| | the input vector, it can be bigger (this is helpful for powerpc where <2 x i16>
is a legal vector type but i16 isn't a legal type, IIRC).  However this wasn't
being taken into account by ExpandRes_EXTRACT_VECTOR_ELT, causing PR13220.
Lightly tweaked version of a patch by Michael Liao.
llvm-svn: 160116 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | r1025 = s/zext r1024, 4
r1026 = extract_subreg r1025, 4
to a copy:
r1026 = copy r1024
This is correct. However it uses TII->isCoalescableExtInstr() which can return
true for instructions which essentially does a sext_in_reg so this can end up
with an illegal copy where the source and destination register classes do not
match. Add a check to avoid it. Sorry, no test case possible at this time.
rdar://11849816
llvm-svn: 160059 | 
| | 
| 
| 
| 
| 
| 
| 
| | Ptr, etc.
No functionality change.
llvm-svn: 160042 | 
| | 
| 
| 
| | llvm-svn: 160040 | 
| | 
| 
| 
| 
| 
| 
| | Load and Store nodes into their own functions.
No functional change.
llvm-svn: 160037 | 
| | 
| 
| 
| 
| 
| 
| 
| | an MVT::i1, i.e. before type legalization.
This is a speculative fix for a problem on Mips reported by Akira Hatanaka.
llvm-svn: 160036 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| | multiple scalars and insert them into a vector. Next, we shuffle the elements
into the correct places, as before.
Also fix a small dagcombine bug in SimplifyBinOpWithSameOpcodeHands, when the
migration of bitcasts happened too late in the SelectionDAG process.
llvm-svn: 159991 | 
| | 
| 
| 
| 
| 
| 
| 
| | move, since there are only two possible values.
Previously, this would become an integer extension operation, followed by a real integer->float conversion.
llvm-svn: 159957 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | subtarget CPU descriptions and support new features of
MachineScheduler.
MachineModel has three categories of data:
1) Basic properties for coarse grained instruction cost model.
2) Scheduler Read/Write resources for simple per-opcode and operand cost model (TBD).
3) Instruction itineraties for detailed per-cycle reservation tables.
These will all live side-by-side. Any subtarget can use any
combination of them. Instruction itineraries will not change in the
near term. In the long run, I expect them to only be relevant for
in-order VLIW machines that have complex contraints and require a
precise scheduling/bundling model. Once itineraries are only actively
used by VLIW-ish targets, they could be replaced by something more
appropriate for those targets.
This tablegen backend rewrite sets things up for introducing
MachineModel type #2: per opcode/operand cost model.
llvm-svn: 159891 | 
| | 
| 
| 
| | llvm-svn: 159839 | 
| | 
| 
| 
| | llvm-svn: 159837 | 
| | 
| 
| 
| 
| 
| | corresponding clang warning.
llvm-svn: 159742 | 
| | 
| 
| 
| 
| 
| | booleans.  Patch by James Benton.
llvm-svn: 159739 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | Also allow trailing register mask operands on non-variadic both
MachineSDNodes and MachineInstrs.
The extra physreg RegisterSDNode operands are added to the MI as
<imp-use> operands. This makes it possible to have non-variadic call
instructions.
Call and return instructions really are non-variadic, the argument
registers should only be used implicitly - they are not part of the
encoding.
llvm-svn: 159727 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| | be used here:
  IntegersSubsetMapping
  - Replaced type of Items field from std::list with std::map. In neares future I'll test it with DenseMap and do the correspond replacement
    if possible.
llvm-svn: 159703 | 
| | 
| 
| 
| 
| 
| 
| 
| | IntegersSubsetMapping
  - Replaced type of Items field from std::list with std::map. In neares future I'll test it with DenseMap and do the correspond replacement
    if possible.
llvm-svn: 159659 |