[PATCH] D23253: [X86] Generalized transformation of `definstr gr8; movzx gr32, gr8` to `xor gr32, gr32; definstr gr8`
bryant via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 7 21:02:36 PDT 2016
bryant created this revision.
bryant added reviewers: llvm-commits, mkuper.
bryant set the repository for this revision to rL LLVM.
As indicated by the title, this post-register allocation pre-rewrite pass
that generalizes D21774 by matching patterns of the form,
```
gr8<def> = instr_defining_gr8 # that may or may not use eflags
gr32<def> = movzx gr8
```
into,
```
gr32 = mov32r0 eflags<imp-def> # carefully avoids clobbering eflags
...
gr8<def> = instr_defining_gr8
```
with the goal of reducing read stalls, partial register stalls, micro-ops, and
overall binary size.
Except for a few rare cases, it never performs worse than D21774, and does
surprisingly better in other cases. IACA-annotated assembly output can be found
at https://reviews.llvm.org/P7213 (for x86-64) and at
https://reviews.llvm.org/P7214 (for x86-32).
Not all of the tests have been updated; this is still a work in progress.
Repository:
rL LLVM
https://reviews.llvm.org/D23253
Files:
lib/Target/X86/CMakeLists.txt
lib/Target/X86/X86.h
lib/Target/X86/X86FixupZExt.cpp
lib/Target/X86/X86TargetMachine.cpp
test/CodeGen/X86/avx-intrinsics-x86.ll
test/CodeGen/X86/avx512-cmp.ll
test/CodeGen/X86/cmpxchg-i1.ll
test/CodeGen/X86/cmpxchg-i128-i1.ll
test/CodeGen/X86/fast-isel-cmp.ll
test/CodeGen/X86/fp128-cast.ll
test/CodeGen/X86/fp128-compare.ll
test/CodeGen/X86/sse42-intrinsics-fast-isel.ll
test/CodeGen/X86/sse42-intrinsics-x86.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23253.67116.patch
Type: text/x-patch
Size: 56649 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160808/b0976250/attachment-0001.bin>
More information about the llvm-commits
mailing list