[llvm] Matched some basic ISD::AVGFLOORU patterns (PR #84903)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 12 11:20:17 PDT 2024


================
@@ -859,6 +859,21 @@ define <4 x i32> @urhadd_v4i32(<4 x i32> %x) {
   ret <4 x i32> %r
 }
 
+define <4 x i32> @fixedwidth(<4 x i32> %a0, <4 x i32> %a1)  {
+; CHECK-LABEL: fixedwidth:
+; CHECK:       // %bb.0:
+; CHECK-NEXT:    and v2.16b, v0.16b, v1.16b
+; CHECK-NEXT:    eor v0.16b, v0.16b, v1.16b
+; CHECK-NEXT:    usra v2.4s, v0.4s, #1
+; CHECK-NEXT:    mov v0.16b, v2.16b
+; CHECK-NEXT:    ret
----------------
RKSimon wrote:

This failed to match the uhadd instruction? I think because of the isVector test

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


More information about the llvm-commits mailing list