[all-commits] [llvm/llvm-project] 8b8a48: [X86] Use MVT::i8 instead of MVT::i64 for shift am...

topperc via All-commits all-commits at lists.llvm.org
Mon Feb 10 05:16:45 PST 2020


  Branch: refs/heads/release/10.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 8b8a4834a4b8aaff751c95e458d7a01ceae081a2
      https://github.com/llvm/llvm-project/commit/8b8a4834a4b8aaff751c95e458d7a01ceae081a2
  Author: Craig Topper <craig.topper at intel.com>
  Date:   2020-02-10 (Mon, 10 Feb 2020)

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

  Log Message:
  -----------
  [X86] Use MVT::i8 instead of MVT::i64 for shift amount in BuildSDIVPow2

X86 uses i8 for shift amounts. This code can fail on a 32-bit target
if it runs after type legalization.

This code was copied from AArch64 and modified for X86, but the
shift amount wasn't changed to the correct type for X86.

Fixes PR44812

(cherry picked from commit ec9a94af4d5fb3270f2451fcbec5a3a99f4ac03a)




More information about the All-commits mailing list