Dan Gohman | 36a0947 | 2009-09-08 23:54:48 +0000 | [diff] [blame] | 1 | ; RUN: llc < %s -march=x86-64 | grep {leal .*), %e.\*} | count 1 |
Dan Gohman | e3d9206 | 2008-08-07 02:54:50 +0000 | [diff] [blame] | 2 | |
| 3 | ; Don't eliminate or coalesce away the explicit zero-extension! |
Dan Gohman | 97121ba | 2009-04-08 00:15:30 +0000 | [diff] [blame] | 4 | ; This is currently using an leal because of a 3-addressification detail, |
| 5 | ; though this isn't necessary; The point of this test is to make sure |
| 6 | ; a 32-bit add is used. |
Dan Gohman | e3d9206 | 2008-08-07 02:54:50 +0000 | [diff] [blame] | 7 | |
Evan Cheng | 87d696a | 2009-04-14 00:32:25 +0000 | [diff] [blame] | 8 | define i64 @foo(i64 %a) nounwind { |
Dan Gohman | e3d9206 | 2008-08-07 02:54:50 +0000 | [diff] [blame] | 9 | %b = add i64 %a, 4294967295 |
| 10 | %c = and i64 %b, 4294967295 |
| 11 | %d = add i64 %c, 1 |
| 12 | ret i64 %d |
| 13 | } |