blob: 43279e54d513d358251bec110db1b28bec655f5c [file] [log] [blame]
Chris Lattner905c7522005-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
Matthias Braune2d2ce92017-08-01 22:20:41 +00004; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | grep srawi
Tanya Lattner8bf97c22008-03-25 04:26:08 +00005
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 Lattner905c7522005-10-09 05:31:47 +000010}
Tanya Lattner8bf97c22008-03-25 04:26:08 +000011