[llvm] [WebAssembly] Add support for avgr_u in loops (PR #153252)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 13 22:53:11 PDT 2025
================
@@ -246,6 +246,10 @@ WebAssemblyTargetLowering::WebAssemblyTargetLowering(
MVT::v2f64})
setOperationAction(ISD::SPLAT_VECTOR, T, Legal);
+ // Set avgceilu as legal for i8x16 and i16x8
+ // and isel will convert to AVGR_U w/ tablegen
+ setOperationAction({ISD::AVGCEILU}, {MVT::v8i16, MVT::v16i8}, Legal);
----------------
lukel97 wrote:
Nit, you don't need the {}
```suggestion
setOperationAction(ISD::AVGCEILU, {MVT::v8i16, MVT::v16i8}, Legal);
```
https://github.com/llvm/llvm-project/pull/153252
More information about the llvm-commits
mailing list