https://bugs.llvm.org/show_bug.cgi?id=50096
Bug ID: 50096
Summary: __builtin_popcount(~a) & 1 - > __builtin_popcount(a) &
1
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Scalar Optimizations
Assignee: unassignedb...@nondot.org
Reporter: david.bolvan...@gmail.com
CC: llvm-bugs@lists.llvm.org
----------------------------------------
define i32 @src(i32 %0) noread nowrite nofree {
%1:
%2 = xor i32 %0, 4294967295
%3 = ctpop i32 %2
%4 = and i32 %3, 1
ret i32 %4
}
=>
define i32 @tgt(i32 %0) noread nowrite nofree {
%1:
%2 = ctpop i32 %0
%3 = and i32 %2, 1
ret i32 %3
}
Transformation seems to be correct!
https://godbolt.org/z/hGoxxYYd6
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs