From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21472 invoked by alias); 30 Apr 2010 09:24:16 -0000 Received: (qmail 12202 invoked by uid 48); 30 Apr 2010 09:12:19 -0000 Date: Fri, 30 Apr 2010 09:25:00 -0000 Message-ID: <20100430091219.12201.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug target/43883] missed optimization of constant __int128_t modulus In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "ubizjak 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-04/txt/msg03304.txt.bz2 ------- Comment #2 from ubizjak at gmail dot com 2010-04-30 09:12 ------- (In reply to comment #1) > There isn't any pattern for the TImode variant. Huh? Expansion uses TImode where appropriate: (insn 10 9 11 ttt.c:3 (parallel [ (set (reg:DI 66) (ashiftrt:DI (subreg:DI (reg/v:TI 60 [ x ]) 8) (const_int 63 [0x3f]))) (clobber (reg:CC 17 flags)) ]) -1 (nil)) (insn 11 10 12 ttt.c:3 (set (subreg:DI (reg:TI 65) 0) (reg:DI 66)) -1 (nil)) (insn 12 11 13 ttt.c:3 (parallel [ (set (reg:DI 67) (ashiftrt:DI (reg:DI 66) (const_int 63 [0x3f]))) (clobber (reg:CC 17 flags)) ]) -1 (nil)) (insn 13 12 14 ttt.c:3 (set (subreg:DI (reg:TI 65) 8) (reg:DI 67)) -1 (nil)) (insn 14 13 15 ttt.c:3 (parallel [ (set (reg:TI 68) (lshiftrt:TI (reg:TI 65) (const_int 127 [0x7f]))) (clobber (reg:CC 17 flags)) ]) -1 (nil)) (insn 15 14 16 ttt.c:3 (parallel [ (set (reg:TI 69) (plus:TI (reg/v:TI 60 [ x ]) (reg:TI 68))) (clobber (reg:CC 17 flags)) ]) -1 (nil)) (insn 16 15 17 ttt.c:3 (parallel [ (set (subreg:DI (reg:TI 70) 0) (and:DI (subreg:DI (reg:TI 69) 0) (const_int 1 [0x1]))) (clobber (reg:CC 17 flags)) ]) -1 (nil)) (insn 17 16 18 ttt.c:3 (parallel [ (set (subreg:DI (reg:TI 70) 8) (and:DI (subreg:DI (reg:TI 69) 8) (const_int 0 [0x0]))) (clobber (reg:CC 17 flags)) ]) -1 (nil)) (insn 18 17 19 ttt.c:3 (parallel [ (set (reg:TI 71) (minus:TI (reg:TI 70) (reg:TI 68))) (clobber (reg:CC 17 flags)) ]) -1 (nil)) (insn 19 18 20 ttt.c:2 (set (reg:TI 59 [ ]) (reg:TI 71)) -1 (nil)) Are you sure that proposed solution will cover all corner cases? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43883