[all-commits] [llvm/llvm-project] 4c7c87: [X86] Simplify the code at the end of lowerShuffle...

topperc via All-commits all-commits at lists.llvm.org
Wed Mar 4 20:50:37 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 4c7c87f245c5291ed38d47983e89d69b98660008
      https://github.com/llvm/llvm-project/commit/4c7c87f245c5291ed38d47983e89d69b98660008
  Author: Craig Topper <craig.topper at gmail.com>
  Date:   2020-03-04 (Wed, 04 Mar 2020)

  Changed paths:
    M llvm/lib/Target/X86/X86ISelLowering.cpp

  Log Message:
  -----------
  [X86] Simplify the code at the end of lowerShuffleAsBroadcast.

The original code could create a bitcast from f64 to i64 and back
on 32-bit targets. This was only working because getBitcast was
able to fold the casts away to avoid leaving the illegal i64 type.

Now we handle the scalar case directly by broadcasting using the
scalar type as the element type. Then bitcasting to the final VT.
This works since we ensure the scalar type is the same size as
the final VT element type. No more casts to i64.

For the vector case, we cast to VT or subvector of VT. And then
do the broadcast.

I think this all matches what we generated before, just in a more
readable way.




More information about the All-commits mailing list