diff options
author | Nikolai Bozhenov <nikolai.bozhenov@intel.com> | 2017-01-12 19:34:15 +0000 |
---|---|---|
committer | Nikolai Bozhenov <nikolai.bozhenov@intel.com> | 2017-01-12 19:34:15 +0000 |
commit | 6bdf92cec7b37eea163885ef6a6324019c1da93f (patch) | |
tree | 6ac6d5ed7a1851a8885820d9b59025801d8c4479 /clang/test/CodeGen/integer-overflow.c | |
parent | 05b40959908f10f23ceb6c0b32c23805a2ea7fb4 (diff) | |
download | llvm-6bdf92cec7b37eea163885ef6a6324019c1da93f.zip llvm-6bdf92cec7b37eea163885ef6a6324019c1da93f.tar.gz llvm-6bdf92cec7b37eea163885ef6a6324019c1da93f.tar.bz2 |
[X86] Tune bypassing of slow division for Intel CPUs
64-bit integer division in Intel CPUs is extremely slow, much slower
than 32-bit division. On the other hand, 8-bit and 16-bit divisions
aren't any faster. The only important exception is Atom where DIV8
is fastest. Because of that, the patch
1) Enables bypassing of 64-bit division for Atom, Silvermont and
all big cores.
2) Modifies 64-bit bypassing to use 32-bit division instead of
16-bit one. This doesn't make the shorter division slower but
increases chances of taking it. Moreover, it's much more likely
to prove at compile-time that a value fits 32 bits and doesn't
require a run-time check (e.g. zext i32 to i64).
Differential Revision: https://reviews.llvm.org/D28196
llvm-svn: 291800
Diffstat (limited to 'clang/test/CodeGen/integer-overflow.c')
0 files changed, 0 insertions, 0 deletions