[llvm-dev] [Perf Regressions] r299379 - [CodeGenPrep] move aarch64-type-promotion to CGP

Evgeny Astigeevich via llvm-dev llvm-dev at lists.llvm.org
Tue Apr 4 04:06:01 PDT 2017

Hi Jun,

Your commit caused performance regressions on AArch64 Cortex-53: http://llvm.org/perf/db_default/v4/nts/110757

MultiSource/Benchmarks/TSVC/Packing-flt/Packing-flt:  -16.61%
MultiSource/Benchmarks/TSVC/Packing-dbl/Packing-dbl: -14.02%

Other regressions on the page are noise.

I see a difference in generated code which is hot:

===== r299379 =====

14.19%	40f910		ldr	s0, [x9]
21.37%	40f914		fcmp	s0, #0.0
7.14%	40f918		b.le	40f930 <s342+0xd0>
	40f91c		sxtw	x10, w10
7.05%	40f920		add	x10, x10, #0x1
14.02%	40f924		add	x11, x19, x10, lsl #2
21.16%	40f928		ldr	w11, [x11,x26]
7.79%	40f92c		str	w11, [x9]
	40f930		sub	x8, x8, #0x1
7.25%	40f934		add	x9, x9, #0x4


===== r299314 =====

16.54%	40f918		ldr	s0, [x9]
25.29%	40f91c		fcmp	s0, #0.0
8.08%	40f920		b.le	40f934 <s342+0xcc>
	40f924		add	w10, w10, #0x1
8.23%	40f928		add	x11, x19, w10, sxtw #2
24.63%	40f92c		ldr	w11, [x11,x26]
9.03%	40f930		str	w11, [x9]
	40f934		sub	x8, x8, #0x1
8.17%	40f938		add	x9, x9, #0x4


I see ' add x11, x19, w10, sxtw #2' is transformed into:

	40f91c		sxtw	x10, w10
	40f924		add	x11, x19, x10, lsl #2

You can get the code of the benchmarks from here: https://llvm.org/svn/llvm-project/test-suite/trunk/

Could you please have a look at them?

Evgeny Astigeevich
Senior Compiler Engineer
Compilation Tools

-----Original Message-----
From: llvm-commits [mailto:llvm-commits-bounces at lists.llvm.org] On Behalf Of Jun Bum Lim via llvm-commits
Sent: Monday, April 03, 2017 8:20 PM
To: llvm-commits at lists.llvm.org
Subject: [llvm] r299379 - [CodeGenPrep] move aarch64-type-promotion to CGP

Author: junbuml
Date: Mon Apr  3 14:20:07 2017
New Revision: 299379

URL: http://llvm.org/viewvc/llvm-project?rev=299379&view=rev
[CodeGenPrep] move aarch64-type-promotion to CGP

Move the aarch64-type-promotion pass within the existing type promotion framework in CGP.
This change also support forking sexts when a new sext is required for promotion.
Note that change is based on D27853 and I am submitting this out early to provide a better idea on D27853.

Reviewers: jmolloy, mcrosier, javed.absar, qcolombet

Reviewed By: qcolombet

Subscribers: llvm-commits, aemerson, rengolin, mcrosier

Differential Revision: https://reviews.llvm.org/D28680

More information about the llvm-dev mailing list