From 9552dd187aadd92aeacda13ad4294be12ebe85ab Mon Sep 17 00:00:00 2001 From: Hiroshi Inoue Date: Fri, 12 Oct 2018 14:02:20 +0000 Subject: [PowerPC] avoid masking already-zero bits in BitPermutationSelector The current BitPermutationSelector generates a code to build a value by tracking two types of bits: ConstZero and Variable. ConstZero means a bit we need to mask off and Variable is a bit we copy from an input value. This patch add third type of bits VariableKnownToBeZero caused by AssertZext node or zero-extending load node. VariableKnownToBeZero means a bit comes from an input value, but it is known to be already zero. So we do not need to mask them. VariableKnownToBeZero enhances flexibility to group bits, since we can avoid redundant masking for these bits. This patch also renames "HasZero" to "NeedMask" since now we may skip masking even when we have zeros (of type VariableKnownToBeZero). Differential Revision: https://reviews.llvm.org/D48025 llvm-svn: 344347 --- llvm/test/CodeGen/PowerPC/rlwimi-dyn-and.ll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/test/CodeGen/PowerPC/rlwimi-dyn-and.ll') diff --git a/llvm/test/CodeGen/PowerPC/rlwimi-dyn-and.ll b/llvm/test/CodeGen/PowerPC/rlwimi-dyn-and.ll index 0d7501afc27..6e2802f6ff9 100644 --- a/llvm/test/CodeGen/PowerPC/rlwimi-dyn-and.ll +++ b/llvm/test/CodeGen/PowerPC/rlwimi-dyn-and.ll @@ -39,7 +39,7 @@ next: ret i32 %conv174 ; CHECK-LABEL: @test2 -; CHECK: slwi 3, {{[0-9]+}}, 7 +; CHECK: rlwinm 3, {{[0-9]+}}, 7, 17, 24 ; CHECK: rlwimi 3, {{[0-9]+}}, 15, 16, 16 ; CHECK: blr } -- cgit v1.2.3