Skip to content
Commit 5f916d3d authored by Hans Wennborg's avatar Hans Wennborg
Browse files

[X86] Use "and $0" and "orl $-1" to store 0 and -1 when optimizing for minsize

64-bit, 32-bit and 16-bit move-immediate instructions are 7, 6, and 5 bytes,
respectively, whereas and/or with 8-bit immediate is only three bytes.

Since these instructions imply an additional memory read (which the CPU could
elide, but we don't think it does), restrict these patterns to minsize functions.

Differential Revision: http://reviews.llvm.org/D18374

llvm-svn: 264440
parent 9cd77ce1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment