[llvm] Reland `[CodeGenPrepare] Convert `ctpop(X) ==/!= 1` into `ctpop(X) u</u> 2/1` (#111284)` (PR #111998)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 11 07:50:48 PDT 2024


================
@@ -155,7 +155,7 @@ define <4 x i1> @neither_pow2_non_zero_4xv64(<4 x i64> %xin) {
 ; CHECK-AVX512:       # %bb.0:
 ; CHECK-AVX512-NEXT:    vporq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to4}, %ymm0, %ymm0
 ; CHECK-AVX512-NEXT:    vpopcntq %ymm0, %ymm0
-; CHECK-AVX512-NEXT:    vpcmpneqq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to4}, %ymm0, %k1
+; CHECK-AVX512-NEXT:    vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to4}, %ymm0, %k1
----------------
dtcxzyw wrote:

Can you explain it further? I have checked intel intrinsic guide. Both `vpcmpneqq` and `vpcmpgtq` takes 3 cycles.


https://github.com/llvm/llvm-project/pull/111998


More information about the llvm-commits mailing list