From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26389 invoked by alias); 11 Sep 2010 13:50:14 -0000 Received: (qmail 26219 invoked by uid 48); 11 Sep 2010 13:49:59 -0000 Date: Sat, 11 Sep 2010 13:50:00 -0000 Message-ID: <20100911134959.26218.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug rtl-optimization/44281] [4.3/4.4/4.5/4.6 Regression] Global Register variable pessimisation In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "hjl dot tools at gmail dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-09/txt/msg01458.txt.bz2 ------- Comment #3 from hjl dot tools at gmail dot com 2010-09-11 13:49 ------- (In reply to comment #2) > GCC snapshot has regressed compared to gcc-4.5: > > #include > #include > > #define LIKELY(x) __builtin_expect(!!(x), 1) > #define UNLIKELY(x) __builtin_expect(!!(x), 0) > > register uint32_t *Iptr __asm__("rbp"); > > typedef void (*inst_t)(uint64_t types, uint64_t a, uint64_t b); > > __attribute__ ((noinline)) void dec_helper(uint64_t types, uint64_t a, uint64_t > b) { > assert("FIXME"==""); > } > > void dec(uint64_t types, uint64_t a, uint64_t b) { > if (LIKELY((types & 0xFF) == 1)) { > uint32_t next = Iptr[1]; > --a; > ++Iptr; > ((inst_t) (uint64_t) next)(types, a, b); > } else dec_helper(types, a, b); > } This is caused by revision 160124: http://gcc.gnu.org/ml/gcc-cvs/2010-06/msg00036.html -- hjl dot tools at gmail dot com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hubicka at gcc dot gnu dot | |org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44281