49 lines · plain
1; RUN: llc -verify-machineinstrs -mcpu=pwr7 < %s | FileCheck %s2target datalayout = "E-m:e-i64:64-n32:64"3target triple = "powerpc64-unknown-linux-gnu"4 5define i32 @test1() #0 {6entry:7 %conv67.reload = load i32, ptr undef8 %const = bitcast i32 65535 to i329 br label %next10 11next:12 %shl161 = shl nuw nsw i32 %conv67.reload, 1513 %0 = load i8, ptr undef, align 114 %conv169 = zext i8 %0 to i3215 %shl170 = shl nuw nsw i32 %conv169, 716 %const_mat = add i32 %const, -3276717 %shl161.masked = and i32 %shl161, %const_mat18 %conv174 = or i32 %shl170, %shl161.masked19 ret i32 %conv17420 21; CHECK-LABEL: @test122; CHECK-NOT: rlwimi 3, {{[0-9]+}}, 15, 0, 1623; CHECK: blr24}25 26define i32 @test2() #0 {27entry:28 %conv67.reload = load i32, ptr undef29 %const = bitcast i32 65535 to i3230 br label %next31 32next:33 %shl161 = shl nuw nsw i32 %conv67.reload, 1534 %0 = load i8, ptr undef, align 135 %conv169 = zext i8 %0 to i3236 %shl170 = shl nuw nsw i32 %conv169, 737 %shl161.masked = and i32 %shl161, 3276838 %conv174 = or i32 %shl170, %shl161.masked39 ret i32 %conv17440 41; CHECK-LABEL: @test242; CHECK: rlwinm 3, {{[0-9]+}}, 7, 17, 2443; CHECK: rlwimi 3, {{[0-9]+}}, 15, 16, 1644; CHECK: blr45}46 47attributes #0 = { nounwind }48 49