[llvm] [InstCombine] Optimize x * !x to 0 for vector #84608 (PR #84792)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 11 09:44:08 PDT 2024


================
@@ -2049,3 +2049,13 @@ define i32 @zext_negpow2_use(i8 %x) {
   %r = mul i32 %zx, -16777216 ; -1 << 24
   ret i32 %r
 }
+
+define <4 x i32> @mul_icmp_with_zero(<4 x i32> %x) {
----------------
dtcxzyw wrote:

Could you please add a scalar test?


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


More information about the llvm-commits mailing list