[llvm] [RISCV][ISel] Fold trunc (lshr (add (zext X), (zext Y)), 1) -> vaaddu X, Y (PR #76550)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 8 02:28:54 PST 2024


================
@@ -0,0 +1,186 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4
+; RUN: llc -mtriple=riscv32 -mattr=+v -verify-machineinstrs < %s | FileCheck %s
+; RUN: llc -mtriple=riscv64 -mattr=+v -verify-machineinstrs < %s | FileCheck %s
+
+
+define <8 x i8> @vaaddu_i8(ptr %x, ptr %y) {
----------------
lukel97 wrote:

Nit, could we drop the loads and instead just pass in the vectors directly to the tests? e.g. 

```llvm
define <8 x i8> @vaaddu_i8(<8 x i8> %x, <8 x i8> %y) {
```

That way we're just testing the interesting parts, and we don't need the vaaddu_i8_arg test

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


More information about the llvm-commits mailing list