[PATCH] D80485: [DAGCombiner][PowerPC] Remove isMulhCheaperThanMulShift TLI hook. Use isOperationLegalOrCustom directly instead.

Amy Kwan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 20 10:14:39 PDT 2020


amyk added a comment.

In D80485#2341858 <https://reviews.llvm.org/D80485#2341858>, @piotr wrote:

> Hi! This commit causes problems for AMDGPU backend - see attached file F13392080: repro.ll <https://reviews.llvm.org/F13392080>. Any ideas before I start investigating this in detail?
>
> LLVM ERROR: Cannot select: t56: i16 = mulhs t42, Constant:i16<-32509>
>
>   t42: i16 = truncate t67
>     t67: i32 = add t66, t28
>       t66: i32 = add t37, t34
>         t37: i32 = shl nuw nsw t12, Constant:i32<13>
>           t12: i32,ch = CopyFromReg t0, Register:i32 %5
>             t11: i32 = Register %5
>           t36: i32 = Constant<13>
>         t34: i32 = shl nuw nsw t10, Constant:i32<7>
>           t10: i32,ch = CopyFromReg t0, Register:i32 %4
>             t9: i32 = Register %4
>           t26: i32 = Constant<7>
>       t28: i32 = add t16, t27
>         t16: i32,ch = CopyFromReg t0, Register:i32 %7
>           t15: i32 = Register %7
>         t27: i32 = shl t8, Constant:i32<7>
>           t8: i32,ch = CopyFromReg t0, Register:i32 %3
>             t7: i32 = Register %3
>           t26: i32 = Constant<7>
>   t52: i16 = Constant<-32509>

Hi, I agree with the suggestion by @dmgreen. Could you see if that works?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80485/new/

https://reviews.llvm.org/D80485



More information about the llvm-commits mailing list