blob: 54f24c612660e68c30253bfe3ad88c81b96a643a [file] [log] [blame]
Chris Lattner0cb34c42005-10-09 05:31:47 +00001; This was erroneously being turned into an rlwinm instruction.
2; The sign bit does matter in this case.
3
Tanya Lattner6f729d62008-03-25 04:26:08 +00004; RUN: llvm-as < %s | llc -march=ppc32 | grep srawi
5
6define i32 @test(i32 %X) {
7 %Y = and i32 %X, -2 ; <i32> [#uses=1]
8 %Z = ashr i32 %Y, 11 ; <i32> [#uses=1]
9 ret i32 %Z
Chris Lattner0cb34c42005-10-09 05:31:47 +000010}
Tanya Lattner6f729d62008-03-25 04:26:08 +000011