blob: 12a08e161b0513631311ed8c43854138656ceecd [file] [log] [blame]
Daniel Dunbar87875302008-11-12 12:31:28 +00001IRgen optimization opportunities.
2
3//===---------------------------------------------------------------------===//
4
5The common pattern of
6--
7short x; // or char, etc
8(x == 10)
9--
10generates an zext/sext of x which can easily be avoided.
11
12//===---------------------------------------------------------------------===//
13
14Bitfields accesses can be shifted to simplify masking and sign
15extension. For example, if the bitfield width is 8 and it is
16appropriately aligned then is is a lot shorter to just load the char
17directly.
18
19//===---------------------------------------------------------------------===//