This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/82580] Optimize comparisons for __int128 on x86-64
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 18 Oct 2017 12:14:18 +0000
- Subject: [Bug target/82580] Optimize comparisons for __int128 on x86-64
- Auto-submitted: auto-generated
- References: <bug-82580-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82580
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Nice. I wonder about one further thing.
With your patch, we generate e.g. in f0:
xorq %rdx, %rdi
xorq %rcx, %rsi
xorl %eax, %eax
orq %rsi, %rdi
sete %al
i.e. for the flags we first clear %eax and then setX %al, but for f2
cmpq %rdi, %rdx
sbbq %rsi, %rcx
setb %al
movzbl %al, %eax
Seems this is done in
;; Convert setcc + movzbl to xor + setcc if operands don't overlap.
peephole2s, do we need a peephole for this as well, or some more general
peephole2 or other means of optimizing this?