M680x0-mono-repo icon indicating copy to clipboard operation
M680x0-mono-repo copied to clipboard

Preliminary lowering support for M68kISD::(S|U)MUL

Open mshockwave opened this issue 2 years ago • 0 comments

In some cases, specifically when lowering select, we will lower to our own M68kISD::(U|S)MUL first before isel-ing to real instructions. In order to account for overflow bit usages. For instance:

entry:
  %1 = call { i32, i1 } @llvm.umul.with.overflow.i32(i32 %0, i32 8)
  %2 = extractvalue { i32, i1 } %1, 1
  %3 = select i1 %2, i32 0, i32 %0

However we never bothered (or forgot) to do the isel part 😛 . This patch add preliminary supports for such thing

Local commit: https://github.com/M680x0/M680x0-mono-repo/commit/278701ac6fe0918b23e85a1cf4f07ee6c8850260

mshockwave avatar Mar 27 '23 23:03 mshockwave