[PATCH] D86395: InstCombine transform pattern "(~A & B) ^ A -> (A | B)" added
Dávid Bolvanský via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 22 05:27:31 PDT 2020
xbolva00 added inline comments.
================
Comment at: llvm/test/Transforms/InstCombine/xor-or.ll:4
+; (~A & B) ^ A --> (A | B)
+define dso_local i32 @test1(i32 %0, i32 %1) local_unnamed_addr #0 {
+; CHECK-LABEL: @test1(
----------------
define i32 @test2(i32 %0, i32 %1) {
%3 = xor i32 %0, -1
%4 = and i32 %1, %3
%5 = xor i32 %4, %0
ret i32 %5
}
define i32 @test3(i32 %0, i32 %1) {
%3 = xor i32 %0, -1
%4 = and i32 %3, %1
%5 = xor i32 %0, %4
ret i32 %5
}
================
Comment at: llvm/test/Transforms/InstCombine/xor-or.ll:4
+; (~A & B) ^ A --> (A | B)
+define dso_local i32 @test1(i32 %0, i32 %1) local_unnamed_addr #0 {
+; CHECK-LABEL: @test1(
----------------
xbolva00 wrote:
> define i32 @test2(i32 %0, i32 %1) {
> %3 = xor i32 %0, -1
> %4 = and i32 %1, %3
> %5 = xor i32 %4, %0
> ret i32 %5
> }
>
> define i32 @test3(i32 %0, i32 %1) {
> %3 = xor i32 %0, -1
> %4 = and i32 %3, %1
> %5 = xor i32 %0, %4
> ret i32 %5
> }
Remove dso_local and "local_unnamed_addr #0"
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86395/new/
https://reviews.llvm.org/D86395
More information about the llvm-commits
mailing list