| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
|
|
|
|
| |
X86ISD::SETCC node in the merged function. NFCI
Only one of the 3 callers of LowerAndToBT need the SETCC node. Two of them have to look through it to find the operands they really need. Instead create it after the one call that needs it.
LowerAndToBT now returns both the BT node and the X86 specific condition code separately.
llvm-svn: 350081
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
These instructions are currently unused in our backend, but for
completeness it is good to support them, so they can be used with
the assembler in hand-written code.
Tests are very basic, signature support missing much like other blocks.
Reviewers: dschuff, aheejin
Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D55973
llvm-svn: 350079
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
It does so using a simple nesting stack, and gives clear errors upon
violation. This is unique to wasm, since most CPUs do not have
any nested constructs.
Had to add an end of file check to the general assembler for this.
Note: if/else/end instructions are not currently supported in our
tablegen defs, so these tests will be enabled in a follow-up.
They already pass the nesting check.
Reviewers: dschuff, aheejin
Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D55797
llvm-svn: 350078
|
| |
|
|
|
|
|
| |
`OneUseInst` is set outside of the loop before and `OneUse` does not
change throughout the loop, so this line is not necessary.
llvm-svn: 350076
|
| |
|
|
| |
llvm-svn: 350075
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Existing LIR recognizes CTLZ where shifting input variable right until it is zero. (Shift-Until-Zero idiom)
This commit:
1. Augments Shift-Until-Zero idiom to recognize CTTZ where input variable is shifted left.
2. Prepare for BitScan idiom recognition.
Patch by Yuanfang Chen (tabloid.adroit)
Reviewers: craig.topper, evstupac
Reviewed By: craig.topper
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D55876
llvm-svn: 350074
|
| |
|
|
|
|
|
|
|
| |
Fixes crash reported after r347354 for frontends that don't always emit
'this' pointers for methods. Now we will silently produce debug info
that makes functions like this look like static methods, which seems
reasonable.
llvm-svn: 350073
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The patch adds a possibility to make library calls on NVPTX.
An important thing about library functions - they must be defined within
the current module. This basically should guarantee that we produce a
valid PTX assembly (without calls to not defined functions). The one who
wants to use the libcalls is probably will have to link against
compiler-rt or any other implementation.
Currently, it's completely impossible to make library calls because of
error LLVM ERROR: Cannot select: i32 = ExternalSymbol '...'. But we can
lower ExternalSymbol to TargetExternalSymbol and verify if the function
definition is available.
Also, there was an issue with a DAG during legalisation. When we expand
instruction into libcall, the inner call-chain isn't being "integrated"
into outer chain. Since the last "data-flow" (call retval load) node is
located in call-chain earlier than CALLSEQ_END node, the latter becomes
a leaf and therefore a dead node (and is being removed quite fast).
Proposed here solution relies on another data-flow pseudo nodes
(ProxyReg) which purpose is only to keep CALLSEQ_END at legalisation and
instruction selection phases - we remove the pseudo instructions before
register scheduling phase.
Patch by Denys Zariaiev!
Differential Revision: https://reviews.llvm.org/D34708
llvm-svn: 350069
|
| |
|
|
| |
llvm-svn: 350064
|
| |
|
|
|
|
|
|
|
|
| |
Add widen scalar for type index 1 (i1 condition) for G_SELECT.
Select G_SELECT for pointer, s32(integer) and smaller low level
types on MIPS32.
Differential Revision: https://reviews.llvm.org/D56001
llvm-svn: 350063
|
| |
|
|
| |
llvm-svn: 350062
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This patch is to fix the bug imported by rL341634.
In above submit , the the return type of ISD::ADDE is
14224: SDVTList VTs = DAG.getVTList(MVT::i64, MVT::i64),
but in fact, the second return type of ISD::ADDE should be
MVT::Glue not MVT::i64.
Reviewed By: hfinkel
Differential Revision: https://reviews.llvm.org/D55977
llvm-svn: 350061
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is an alternative to what I attempted in D56057.
GetDemandedBits is a special version of SimplifyDemandedBits that allows simplifications even when the operand has other uses. GetDemandedBits will only do simplifications that allow a node to be bypassed. It won't create new nodes or alter any of the other users.
I had to add support for bypassing SIGN_EXTEND_INREG to GetDemandedBits.
Based on a patch that Simon Pilgrim sent me in email.
Fixes PR40142.
llvm-svn: 350059
|
| |
|
|
|
|
| |
Differential revision: https://reviews.llvm.org/D55926
llvm-svn: 350055
|
| |
|
|
|
|
|
| |
These patches have broken almost all buildbots on test
DebugInfo/X86/addr_comments.ll. Reverting to green.
llvm-svn: 350052
|
| |
|
|
| |
llvm-svn: 350050
|
| |
|
|
|
|
|
|
|
|
| |
This patch teaches LoopSimplifyCFG to remove dead exiting edges
from loops.
Differential Revision: https://reviews.llvm.org/D54025
Reviewed By: fedor.sergeev
llvm-svn: 350049
|
| |
|
|
|
|
| |
reading/editing
llvm-svn: 350048
|
| |
|
|
| |
llvm-svn: 350047
|
| |
|
|
|
|
|
|
| |
found) when non-verbose dumping addrx forms
There's a few bugs here still - demonstrated with FIXITs in the test.
llvm-svn: 350046
|
| |
|
|
|
|
|
|
| |
The underlying bug that caused the revert should be fixed by rL348567.
Differential Revision: https://reviews.llvm.org/D54023
llvm-svn: 350045
|
| |
|
|
|
|
|
|
|
| |
Both of these places reference memset-like loops. Memset is precise.
Trying to keep these patches super small so they're easily post-commit
verifiable, as requested in D44748.
llvm-svn: 350044
|
| |
|
|
| |
llvm-svn: 350043
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
More migration so we can disable the implicit int -> LocationSize
conversion.
All of these are either scatter/gather'ed vector instructions, or direct
loads. Hence, they're all precise.
Perhaps if we see way more getTypeStoreSize calls, we can make a
getTypeStoreLocationSize (or similar) as a wrapper that applies this
::precise. Doesn't appear that it's a good idea to make getTypeStoreSize
return a LocationSize itself, however.
llvm-svn: 350042
|
| |
|
|
|
|
|
|
| |
SRL/SHL+TEST to X86ISelDAGToDAG.
This cleans more code out of EmitTest.
llvm-svn: 350041
|
| |
|
|
|
|
|
|
| |
Remove the TESTmr isel patterns and add another postprocessing combine for TESTrr+ANDrm->TESTmr. We already have a postprocessing combine for TESTrr+ANDrr->TESTrr. With this we can give ANDN a chance to match first. And clean it up during post processing if we ended up with just a regular AND.
This is another step towards my plan to gut EmitTest and do more flag handling during isel matching or by using optimizeCompare.
llvm-svn: 350038
|
| |
|
|
|
|
|
|
|
|
| |
It's dangerous to knowingly create an illegal vector type
no matter what stage of combining we're in.
This prevents the missed folding/scalarization seen in:
https://bugs.llvm.org/show_bug.cgi?id=40146
llvm-svn: 350034
|
| |
|
|
| |
llvm-svn: 350032
|
| |
|
|
|
|
|
| |
The `fp` and `s8` register names are synonyms. But `fp` better reflects
a purpose of the register.
llvm-svn: 350023
|
| |
|
|
| |
llvm-svn: 350022
|
| |
|
|
|
|
| |
It's redundant to restore the `$a3` register twice.
llvm-svn: 350021
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Trying to keep these patches super small so they're easily post-commit
verifiable, as requested in D44748.
srcSize is derived from the size of an alloca, and we quit out if the
size of that is > the size of the thing we're copying to. Hence, we
should always copy everything over, so these sizes are precise.
Don't make srcSize itself a LocationSize, since optionality isn't
helpful, and we do some comparisons against other sizes elsewhere in
that function.
llvm-svn: 350019
|
| |
|
|
|
|
| |
We won't end up using an ANDN instruction in this case so we should generate the same code we do for pre-BMI targets.
llvm-svn: 350018
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Trying to keep these patches super small so they're easily post-commit
verifiable, as requested in D44748.
This one sadly isn't *super* small, but all of the changes here are
either to:
- libfuncs that are passed a constant size (memcpy, memset, ...)
- instructions that store/load a constant size
So they have to be precise
llvm-svn: 350017
|
| |
|
|
|
|
|
|
|
|
| |
Keeping these patches super small so they're easily post-commit
verifiable, as requested in D44748.
This tries to find literal loads/stores of the given type, so this has
to be precise.
llvm-svn: 350016
|
| |
|
|
|
|
|
| |
Keeping these patches super small so they're easily post-commit
verifiable, as requested in D44748.
llvm-svn: 350015
|
| |
|
|
|
|
|
| |
Keeping these patches super small so they're easily post-commit
verifiable, as requested in D44748.
llvm-svn: 350014
|
| |
|
|
|
|
| |
instruction we use for sequentially consistent fence in 32-bit mode without SSE2.
llvm-svn: 350013
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
accessing ranges defined by low/high_pc
This is difficult/not possible to test in LLVM, but is visible as a
crash in LLD when parsing DWARF to generate gdb-index.
This function is called by llvm-dwarfdump when parsing high_pc for
non-verbose output (to print the actual high_pc rather than the low_pc
relative value), but in that case llvm-dwarfdump doesn't print section
names (if it did, it would hit this problem).
We could add some other features to llvm-dwarfdump to expose this, but
nothing really springs to my mind. I will add a test to lld, though.
llvm-svn: 350010
|
| |
|
|
| |
llvm-svn: 350009
|
| |
|
|
|
|
|
| |
Keeping these patches super small so they're easily post-commit
verifiable, as requested in D44748.
llvm-svn: 350008
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
trunc (add X, C ) --> add (trunc X), C'
If we're throwing away the top bits of an 'add' instruction, do it in the narrow destination type.
This makes the truncate-able opcode list identical to the sibling transform done in IR (in instcombine).
This change used to show regressions for x86, but those are gone after D55494.
This gets us closer to deleting the x86 custom function (combineTruncatedArithmetic)
that does almost the same thing.
Differential Revision: https://reviews.llvm.org/D55866
llvm-svn: 350006
|
| |
|
|
|
|
|
|
|
|
|
| |
The missed load folding noticed in D55898 is visible independent of that change
either with an adjusted IR pattern to start or with AVX2/AVX512 (where the build
vector becomes a broadcast first; movddup is not produced until we get into isel
via tablegen patterns).
Differential Revision: https://reviews.llvm.org/D55936
llvm-svn: 350005
|
| |
|
|
|
|
| |
When dumping string or address indexes
llvm-svn: 349997
|
| |
|
|
|
|
| |
(addr attributes coming shortly)
llvm-svn: 349996
|
| |
|
|
|
|
|
|
|
|
|
| |
Currently the section name (& possibly number) is only printed on
addresses in ranges - but no reason it couldn't also be displayed on
other addresses (like low/high PC).
Refactor in that direction by pulling out the section lookup and name
ambiguity dumping logic into a reusable helper.
llvm-svn: 349995
|
| |
|
|
| |
llvm-svn: 349985
|
| |
|
|
|
|
|
|
| |
X86::AddrBaseReg/AddrIndexReg, etc. instead of hardcoded constants.
Makes the code a little more readable.
llvm-svn: 349983
|
| |
|
|
|
|
|
|
| |
NVPTXAsmPrinter::doInitialization() was creating an NVPTXSubtarget on
the stack. This object is huge, about 80kb. Also it's slow to create.
And it's all redundant; we have one in NVPTXTargetMachine anyway!
llvm-svn: 349982
|
| |
|
|
|
|
|
|
| |
Propagate the llvm::Error a little further up. This is NFC for
llvm-dwarfdump in this change, but allows ld.lld to emit more precise
error messages about which object and archive the erroneous DWARF is in.
llvm-svn: 349978
|