blob: 4d37d691d8629f635e3979179e801b4a33045938 [file] [log] [blame]
Ehsan Amiria538b0f2016-08-03 18:17:35 +00001; RUN: llc -verify-machineinstrs < %s | FileCheck %s
Hal Finkelb1518d62015-09-05 00:02:59 +00002target datalayout = "E-m:e-i64:64-n32:64"
3target triple = "powerpc64-unknown-linux-gnu"
4
5@m = external global i32, align 4
6
7; Function Attrs: nounwind
8define signext i32 @main() #0 {
9entry:
10
11; CHECK-LABEL: @main
12; CHECK-NOT: rlwimi
13; CHECK: andi
14
15 %0 = load i32, i32* @m, align 4
16 %or = or i32 %0, 250
17 store i32 %or, i32* @m, align 4
18 %and = and i32 %or, 249
19 %sub.i = sub i32 %and, 0
20 %sext = shl i32 %sub.i, 24
21 %conv = ashr exact i32 %sext, 24
22 ret i32 %conv
23}
24
25attributes #0 = { nounwind "target-cpu"="pwr7" }
26attributes #1 = { nounwind }
27