[all-commits] [llvm/llvm-project] ca8de9: [X86] Fix crash with i64 bitreverse on 32-bit targ...

Craig Topper via All-commits all-commits at lists.llvm.org
Mon Dec 14 13:42:44 PST 2020


  Branch: refs/heads/release/11.x
  Home:   https://github.com/llvm/llvm-project
  Commit: ca8de9ad8895ab1368135f6fc63f29fe92b75c76
      https://github.com/llvm/llvm-project/commit/ca8de9ad8895ab1368135f6fc63f29fe92b75c76
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2020-12-14 (Mon, 14 Dec 2020)

  Changed paths:
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/test/CodeGen/X86/bitreverse.ll

  Log Message:
  -----------
  [X86] Fix crash with i64 bitreverse on 32-bit targets with XOP.

We unconditionally marked i64 as Custom, but did not install a
handler in ReplaceNodeResults when i64 isn't legal type. This
leads to ReplaceNodeResults asserting.

We have two options to fix this. Only mark i64 as Custom on
64-bit targets and let it expand to two i32 bitreverses which
each need a VPPERM. Or the other option is to add the Custom
handling to ReplaceNodeResults. This is what I went with.

(cherry picked from commit 57c0c4a27575840ae0a48eb9f8455a5ed087c857)




More information about the All-commits mailing list