1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 20:12:56 +02:00
llvm-mirror/lib
Peter Collingbourne dcf4c81cd2 ARM: Better codegen for 64-bit compares.
This introduces a custom lowering for ISD::SETCCE (introduced in r253572)
that allows us to emit a short code sequence for 64-bit compares.

Before:

	push	{r7, lr}
	cmp	r0, r2
	mov.w	r0, #0
	mov.w	r12, #0
	it	hs
	movhs	r0, #1
	cmp	r1, r3
	it	ge
	movge.w	r12, #1
	it	eq
	moveq	r12, r0
	cmp.w	r12, #0
	bne	.LBB1_2
@ BB#1:                                 @ %bb1
	bl	f
	pop	{r7, pc}
.LBB1_2:                                @ %bb2
	bl	g
	pop	{r7, pc}

After:

	push	{r7, lr}
	subs	r0, r0, r2
	sbcs.w	r0, r1, r3
	bge	.LBB1_2
@ BB#1:                                 @ %bb1
	bl	f
	pop	{r7, pc}
.LBB1_2:                                @ %bb2
	bl	g
	pop	{r7, pc}

Saves around 80KB in Chromium's libchrome.so.

Some notes on this patch:

- I don't much like the ARMISD::BRCOND and ARMISD::CMOV combines I
  introduced (nothing else needs them). However, they are necessary in
  order to avoid poor codegen, and they seem similar to existing combines
  in other backends (e.g. X86 combines (brcond (cmp (setcc Compare))) to
  (brcond Compare)).

- No support for Thumb-1. This is in principle possible, but we'd need
  to implement ARMISD::SUBE for Thumb-1.

Differential Revision: http://reviews.llvm.org/D15256

llvm-svn: 263962
2016-03-21 18:00:02 +00:00
..
Analysis Implement constant folding for bitreverse 2016-03-21 15:00:35 +00:00
AsmParser DebugInfo: Add ability to not emit DW_AT_vtable_elem_location for virtual functions. 2016-03-17 23:58:03 +00:00
Bitcode Bitcode: Error out instead of crashing on corrupt metadata 2016-03-17 20:12:06 +00:00
CodeGen [DAGCombine] Catch the case where extract_vector_elt can cause an any_ext while processing AND SDNodes 2016-03-21 11:43:46 +00:00
DebugInfo [DebugInfo] Dump CIE augmentation data as a list of hex bytes 2016-03-01 18:38:05 +00:00
ExecutionEngine ExecutionEngine: tweak debug log 2016-03-05 20:00:41 +00:00
Fuzzer [libFuzzer] add a flag close_fd_mask so that we can silence spammy targets by closing stderr/stdout 2016-03-18 20:58:29 +00:00
IR Expose IRBuilder::CreateAtomicCmpXchg as LLVMBuildAtomicCmpXchg in the C API. 2016-03-19 21:28:28 +00:00
IRReader Remove autoconf support 2016-01-26 21:29:08 +00:00
LibDriver Remove autoconf support 2016-01-26 21:29:08 +00:00
LineEditor Remove autoconf support 2016-01-26 21:29:08 +00:00
Linker Rework linkInModule(), making it oblivious to ThinLTO 2016-03-19 00:40:31 +00:00
LTO [ThinLTO] Renaming of function index to module summary index (NFC) 2016-03-15 00:04:37 +00:00
MC [MCParser] Accept uppercase radix variants 0X and 0B 2016-03-18 18:22:07 +00:00
Object [COFF] Refactor section alignment calculation 2016-03-17 16:55:18 +00:00
ObjectYAML Forgot to commit this with r263692 2016-03-17 16:55:11 +00:00
Option Annotate dump() methods with LLVM_DUMP_METHOD, addressing Richard Smith r259192 post commit comment. 2016-01-29 20:50:44 +00:00
Passes [PM] Rename the CRTP mixin base classes for the new pass manager to 2016-03-11 10:33:22 +00:00
ProfileData Variable name cleanup /NFC 2016-03-16 22:13:41 +00:00
Support APFloat: Add frexp 2016-03-21 16:49:16 +00:00
TableGen [TableGen] Fix typos in comments. NFC 2016-02-26 06:50:27 +00:00
Target ARM: Better codegen for 64-bit compares. 2016-03-21 18:00:02 +00:00
Transforms [SimplifyLibCalls] Only consider sinpi/cospi functions within the same function 2016-03-19 04:53:02 +00:00
CMakeLists.txt Move ObjectYAML code to a new library. 2016-03-01 19:15:06 +00:00
LLVMBuild.txt Add LLVMBuild for ObjectYAML. 2016-03-01 21:29:33 +00:00