- Jun 10, 2016
-
-
Roger Ferrer Ibanez authored
llvm-svn: 272380
-
- Jun 09, 2016
-
-
James Molloy authored
ReplaceTailWithBranchTo assumed that if an instruction is predicated, it must be part of an IT block. This is not correct for conditional branches. No testcase as this was triggered by the reverted patch r272017 - test coverage will occur when that patch is re-reverted and there is no known way to trigger this in the meantime. llvm-svn: 272258
-
James Molloy authored
If an immediate is only used in an AND node, it is possible that the immediate can be more optimally materialized when negated. If this is the case, we can negate the immediate and use a BIC instead; int i(int a) { return a & 0xfffffeec; } Used to produce: ldr r1, [CONSTPOOL] ands r0, r1 CONSTPOOL: 0xfffffeec And now produces: movs r1, #255 adds r1, #20 ; Less costly immediate generation bics r0, r1 llvm-svn: 272251
-
- Jun 08, 2016
-
-
Oliver Stannard authored
The MSR instructions can write to the CPSR, but we did not model this fact, so we could emit them in the middle of IT blocks, changing the condition flags for later instructions in the block. The tests use two calls to llvm.write_register.i32 because it is valid to use these instructions at the end of an IT block, which if conversion does do in some cases. With two calls, the first clobbers the flags, so a branch has to be used to make the second one conditional. Differential Revision: http://reviews.llvm.org/D21139 llvm-svn: 272154
-
Diana Picus authored
isSwift is tested earlier and known to be false when we reach this code. llvm-svn: 272127
-
Benjamin Kramer authored
As suggested by clang-tidy's performance-unnecessary-copy-initialization. This can easily hit lifetime issues, so I audited every change and ran the tests under asan, which came back clean. llvm-svn: 272126
-
- Jun 07, 2016
-
-
Oliver Stannard authored
These instructions end in "S" but are not flag-setting, so they need including in the list of special cases in the assembly parser. Differential Revision: http://reviews.llvm.org/D21077 llvm-svn: 272015
-
James Molloy authored
We can materialize these integers using a MOV; ADDi8 pair. llvm-svn: 272007
-
James Molloy authored
A Thumb-2 post-indexed LDR instruction such as: ldr.w r0, [r1], #4 Can be rewritten as: ldm.n r1!, {r0} LDMs can be more expensive than LDRs on some cores, so this has been enabled only in minsize mode. llvm-svn: 272002
-
James Molloy authored
If we have an LDM that uses only low registers and doesn't write to its base register: ldm.w r0, {r1, r2, r3} And that base register is dead after the LDM, then we can convert it to writeback form and use a narrow encoding: ldm.n r0!, {r1, r2, r3} Obviously, this introduces a new register write and so can cause WAW hazards, so I've enabled it only in minsize mode. This is a code size trick that ARM Compiler 5 ("armcc") does that we don't. llvm-svn: 272000
-
Peter Smith authored
The Thumb2 conditional branch B<cond>.W has a different encoding (T3) to the unconditional branch B.W (T4) as it needs to record <cond>. As the encoding is different the B<cond>.W is given a different relocation type. ELF for the ARM Architecture 4.6.1.6 (Table-13) states that R_ARM_THM_JUMP19 should be used for B<cond>.W. At present the MC layer is using the R_ARM_THM_JUMP24 from B.W. This change makes B<cond>.W use R_ARM_THM_JUMP19 and alters the existing test that checks for R_ARM_THM_JUMP24 to expect R_ARM_THM_JUMP19. llvm-svn: 271997
-
Saleem Abdulrasool authored
TLS access requires an offset from the TLS index. The index itself is the section-relative distance of the symbol. For ARM, the relevant relocation (IMAGE_REL_ARM_SECREL) is applied as a constant. This means that the value may not be an immediate and must be lowered into a constant pool. This offset will not be base relocated. We were previously emitting the actual address of the symbol which would be base relocated and would therefore be the vaue offset by the ImageBase + TLS Offset. llvm-svn: 271974
-
Saleem Abdulrasool authored
clang-format a couple of switches in preparation for a future change. Add some enumeration comments llvm-svn: 271973
-
Saleem Abdulrasool authored
Just adjust the whitespace for the selection patterns. NFC. llvm-svn: 271972
-
- Jun 03, 2016
-
-
Sjoerd Meijer authored
in more instructions than the libary call. Differential Revision: http://reviews.llvm.org/D20958 llvm-svn: 271678
-
Sjoerd Meijer authored
new instruction to ARM and AArch64 targets and several system registers. Patch by: Roger Ferrer Ibanez and Oliver Stannard Differential Revision: http://reviews.llvm.org/D20282 llvm-svn: 271670
-
Sjoerd Meijer authored
forces having special checks in ArmInstPrinter::printInstruction. This patch addresses this issue. Not all special checks could be removed: either they involve elaborated conditions under which the alias is emitted (e.g. ldm/stm on sp may be pop/push but only if the number of registers is >= 2) or the number of registers is multivalued (like happens again with ldm/stm) and they do not match the InstAlias pattern which assumes single-valued operands in the pattern. Patch by: Roger Ferrer Ibanez Differential Revision: http://reviews.llvm.org/D20237 llvm-svn: 271667
-
- Jun 02, 2016
-
-
Sjoerd Meijer authored
Differential Revision: http://reviews.llvm.org/D20865 llvm-svn: 271508
-
- Jun 01, 2016
-
-
Rafael Espindola authored
llvm-svn: 271437
-
Oliver Stannard authored
This adds an additional matcher to select UBFX(..) from SRL(AND(..)) in ARMISelDAGToDAG to help with code size. Patch by David Green. Differential Revision: http://reviews.llvm.org/D20667 llvm-svn: 271384
-
- May 31, 2016
-
-
Matthias Braun authored
Physregs have no associated register class, do not attempt to modify it in Thumb2InstrInfo::storeRegToStackSlot()/loadFromStackSlot(). llvm-svn: 271339
-
Rafael Espindola authored
Now this code path knows about position independent executables. llvm-svn: 271290
-
Ranjeet Singh authored
Added support to map intrinsics __builtin_arm_{ldc,ldcl,ldc2,ldc2l,stc,stcl,stc2,stc2l} to their ARM instructions. Differential Revision: http://reviews.llvm.org/D20564 llvm-svn: 271271
-
- May 28, 2016
-
-
Rafael Espindola authored
llvm-svn: 271111
-
Renato Golin authored
This reverts commit r271096, as reverting it broke even more buildbots! But that also means I'll break on ARM again... :( llvm-svn: 271099
-
Renato Golin authored
This reverts commit r271052, as it broke some ARM buildbots. llvm-svn: 271096
-
Rafael Espindola authored
Given where this is used it should be a nop. llvm-svn: 271066
-
- May 27, 2016
-
-
Rafael Espindola authored
DynamicNoPIC was only every used on darwin. This maps it to static on ELF. It matches what is done on X86. llvm-svn: 271052
-
Ahmed Bougacha authored
llvm-svn: 271023
-
Benjamin Kramer authored
It's faster and easier to read. llvm-svn: 271018
-
Benjamin Kramer authored
No functionality change intended, maybe a tiny performance improvement. llvm-svn: 270997
-
Benjamin Kramer authored
clang-tidy's performance-unnecessary-copy-initialization with some manual fixes. No functional changes intended. llvm-svn: 270988
-
Benjamin Kramer authored
Also fold conditions into assert(0) where it makes sense. No functional change intended. llvm-svn: 270982
-
- May 19, 2016
-
-
Ranjeet Singh authored
llvm-svn: 270056
-
Rafael Espindola authored
Having an enum member named Default is quite confusing: Is it distinct from the others? This patch removes that member and instead uses Optional<Reloc> in places where we have a user input that still hasn't been maped to the default value, which is now clear has no be one of the remaining 3 options. llvm-svn: 269988
-
- May 18, 2016
-
-
Rafael Espindola authored
This just clang formats and cleans comments in an area I am about to post a patch for review. llvm-svn: 269946
-
- May 17, 2016
-
-
Rafael Espindola authored
Since r207518 they are printed exactly like non-hidden stubs on x86 and since r207517 on ARM. This means we can use a single set for all stubs in those platforms. llvm-svn: 269776
-
Renato Golin authored
The movw instruction is only available in ARM state for V6T2 and above. The MOVi16 instruction has requirement HasV6T2 but the InstAlias for mov rd, imm where the operand is imm0_65535_expr:$imm does not. This means that movw can incorrectly be used in ARMv4 and ARMv5 by writing mov rd, 0x1234. The simple fix is to the requirement HasV6T2 to the InstAlias. Tests added to not-armv4.s. Patch by Peter Smith. llvm-svn: 269761
-
- May 14, 2016
-
-
Saleem Abdulrasool authored
It seems that cl will emit the export directives for Windows ARM targets. The fact that it did this had originally been missed and this functionality was never implemented. This makes it possible to rely solely on the source code for indicating what the exported interfaces are and brings us more compatibility with cl. llvm-svn: 269574
-
- May 13, 2016
-
-
Tim Northover authored
When setting the frame pointer, the offset from SP is calculated based on the stack slot it gets allocated, but this slot is in turn based on the order of the CSR list so that list should match the order we actually save the registers in. Mostly it did, but in the edge-case of MachO AAPCS targets it was wrong. llvm-svn: 269459
-