diff options
Diffstat (limited to 'test/CodeGen/PowerPC/srl-mask.ll')
-rw-r--r-- | test/CodeGen/PowerPC/srl-mask.ll | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/CodeGen/PowerPC/srl-mask.ll b/test/CodeGen/PowerPC/srl-mask.ll index e581eae0ee57..1a429b1bae36 100644 --- a/test/CodeGen/PowerPC/srl-mask.ll +++ b/test/CodeGen/PowerPC/srl-mask.ll @@ -12,5 +12,16 @@ entry: ; CHECK: blr } +; for AND with an immediate like (x & ~0xFFFF) +; we should use rldicl instruction +define i64 @bar(i64 %x) #0 { +entry: +; CHECK-LABEL: @bar + %a = and i64 %x, 18446744073709486080 +; CHECK: rldicr 3, 3, 0, 47 + ret i64 %a +; CHECK: blr +} + attributes #0 = { nounwind } |