From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0CAB13858D35; Wed, 7 Dec 2022 08:38:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0CAB13858D35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1670402331; bh=UDArrJlgj61iqojOii4yYFVbvXnW/xVpTYxOWaMMMfE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=NGNlsojoW2XNOIPUUQa0ZaVGfAMgF6ptoLYOA9AO/8/j8KsVJ1/PReIiIdqrero57 hOlslXA9hQ6slPD7z3XQ8yUn1Z3t1xbAUSaMuaD3gBianUJRXmAa7sYdMgWOydffxB JTbZCWqrK/t2rLXpqIkPPHdWrEPUuFMjFdjqNWLs= From: "guihaoc at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/108004] x-form logical operations with dot instructions are not emitted. Date: Wed, 07 Dec 2022 08:38:48 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: guihaoc at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: guihaoc at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D108004 --- Comment #4 from HaoChen Gui --- $cat asm_test.c #include unsigned long foo() { unsigned long res; __asm__ ("li 3,0xffffffffffffffff\n\t" "li 4,0xfffffffffffffff1\n\t" "and. 3,3,4\n\t" "mfcr %0" : "=3Dr" (res)); return res; } void main() { printf ("%lx\n", foo()); } $ gcc -O1 -o asm_test asm_test.c && ./asm_test 82000482 Use the assembly to test the "and.". The bit32 (cr0 LT bit) is set when the result is less than 0.=