[llvm] [DAG] fold `avgs(sext(x), sext(y))` -> `sext(avgs(x, y))` (PR #95365)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 13 06:55:38 PDT 2024
================
@@ -870,10 +866,6 @@ define <4 x i16> @hadd8_zext_lsr(<4 x i8> %src1, <4 x i8> %src2) {
define <2 x i16> @hadd8x2_sext_asr(<2 x i8> %src1, <2 x i8> %src2) {
; CHECK-LABEL: hadd8x2_sext_asr:
; CHECK: // %bb.0:
-; CHECK-NEXT: shl.2s v1, v1, #24
-; CHECK-NEXT: shl.2s v0, v0, #24
-; CHECK-NEXT: sshr.2s v1, v1, #24
-; CHECK-NEXT: sshr.2s v0, v0, #24
; CHECK-NEXT: shadd.2s v0, v0, v1
----------------
c8ef wrote:
![image](https://github.com/llvm/llvm-project/assets/90297911/307f276d-d60b-40b4-a6ed-1631644380f5)
I believe it is acceptable for us to modify the definition of `m_SExt` here since Visual Studio indicated that, apart from this pull request, there are no other instances where the function is used, except for in the unit tests.
https://github.com/llvm/llvm-project/pull/95365
More information about the llvm-commits
mailing list