[all-commits] [llvm/llvm-project] 433696: [InstCombine] relax constraints on mask-of-add
RotateRight via All-commits
all-commits at lists.llvm.org
Tue Nov 17 09:14:11 PST 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 433696911a0b8e1b94abd8d8f192380ba7867b61
https://github.com/llvm/llvm-project/commit/433696911a0b8e1b94abd8d8f192380ba7867b61
Author: Sanjay Patel <spatel at rotateright.com>
Date: 2020-11-17 (Tue, 17 Nov 2020)
Changed paths:
M llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
M llvm/test/Transforms/InstCombine/and.ll
Log Message:
-----------
[InstCombine] relax constraints on mask-of-add
There are 2 changes:
1. Remove the unnecessary one-use check.
2. Remove the unnecessary power-of-2 check.
https://rise4fun.com/Alive/V6fP
Name: add with low mask
Pre: (C1 & (-1 u>> countLeadingZeros(C2))) == 0
%a = add i8 %x, C1
%r = and i8 %a, C2
=>
%r = and i8 %x, C2
More information about the All-commits
mailing list