1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-02-01 05:01:59 +01:00
Nikolai Bozhenov 3a4f22c55f [X86] Replace AND+IMM64 with SRL/SHL
Emit SHRQ/SHLQ instead of ANDQ with a 64 bit constant mask if the result
is unused and the mask has only higher/lower bits set. For example, with
this patch LLVM emits

  shrq $41, %rdi
  je

instead of

  movabsq $0xFFFFFE0000000000, %rcx
  testq   %rcx, %rdi
  je

This reduces number of instructions, code size and register pressure.
The transformation is applied only for cases where the mask cannot be
encoded as an immediate value within TESTQ instruction.

Differential Revision: https://reviews.llvm.org/D28198

llvm-svn: 291806
2017-01-12 19:54:27 +00:00
..
2017-01-12 19:54:27 +00:00
2016-10-30 18:13:30 +00:00
2017-01-10 06:01:16 +00:00
2016-10-19 16:58:59 +00:00
2016-10-10 22:04:12 +00:00
2016-10-10 22:01:42 +00:00
2016-09-09 21:36:17 +00:00
2016-09-14 20:21:28 +00:00
2016-09-14 19:42:03 +00:00
2016-10-19 11:16:58 +00:00
2016-09-04 13:30:46 +00:00