blob: e86045db0abb03da369ebed188135345a4aa5a2f [file] [log] [blame]
Dan Gohman0a063102009-09-08 23:54:48 +00001; RUN: llc < %s -march=x86 > %t
Dan Gohman5a5e6e92008-10-17 01:33:43 +00002; RUN: not grep add %t
3; RUN: grep subl %t | count 1
4
5; The immediate can be encoded in a smaller way if the
6; instruction is a sub instead of an add.
7
8define i32 @foo(i32 inreg %a) nounwind {
9 %b = add i32 %a, 128
10 ret i32 %b
11}