[llvm] [DAGCombiner][AMDGPU] Track signedness in ByteProviders (PR #65995)

Jeffrey Byrnes via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 12 07:34:12 PDT 2023


jrbyrnes wrote:

Thanks for swift responses.

> This partially fixes the issue we were seeing, but still fails if one of the src's is signed and the other is unsigned.

```
  %19 = extractelement <4 x i8> %11, i64 1
  %20 = sext i8 %19 to i16
  %21 = extractelement <4 x i8> %13, i64 1
  %22 = zext i8 %21 to i16
  %23 = mul nsw i16 %22, %20
```

I should say this code looks a bit strange, since we are mixing types (signed / unsigned) in the mul operation. In general, I would think the unsigned type "wins" as this is the spirit of the c++ standard, but, since that was causing failures, I have just disabled the combine in such cases. 


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


More information about the llvm-commits mailing list