28 lines · plain
1; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu -mcpu=a2 | FileCheck %s2target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f128:128:128-v128:128:128-n32:64"3target triple = "powerpc64-unknown-linux-gnu"4 5define i64 @foo(i64 %x) #0 {6entry:7; CHECK-LABEL: @foo8 %a = lshr i64 %x, 359 %b = and i64 %a, 6553510; CHECK: rldicl 3, 3, 29, 4811 ret i64 %b12; CHECK: blr13}14 15; for AND with an immediate like (x & ~0xFFFF)16; we should use rldicl instruction17define i64 @bar(i64 %x) #0 {18entry:19; CHECK-LABEL: @bar20 %a = and i64 %x, 1844674407370948608021; CHECK: rldicr 3, 3, 0, 4722 ret i64 %a23; CHECK: blr24}25 26attributes #0 = { nounwind }27 28