[PATCH] D108139: [X86] Freeze vXi8 shl(x,1) -> add(x,x) vector fold (PR50468)

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 16 08:49:30 PDT 2021


RKSimon created this revision.
RKSimon added reviewers: craig.topper, pengfei, spatel, lebedev.ri.
Herald added a subscriber: hiraditya.
RKSimon requested review of this revision.
Herald added a project: LLVM.

We don't have any vXi8 shift instructions (other than on XOP which is handled separately), so replace the  shl(x,1) ->add(x,x) fold with shl(x,1) ->add(freeze(x),freeze(x)) to avoid the undef issues identified in PR50468.

Split off from D106675 <https://reviews.llvm.org/D106675> as I'm still looking at whether we can fix the vXi16/i32/i64 issues with the D106679 <https://reviews.llvm.org/D106679> alternative.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D108139

Files:
  llvm/lib/Target/X86/X86ISelLowering.cpp
  llvm/test/CodeGen/X86/bitreverse.ll
  llvm/test/CodeGen/X86/combine-bitreverse.ll
  llvm/test/CodeGen/X86/vector-bitreverse.ll
  llvm/test/CodeGen/X86/vector-fshl-rot-128.ll
  llvm/test/CodeGen/X86/vector-fshl-rot-256.ll
  llvm/test/CodeGen/X86/vector-fshl-rot-512.ll
  llvm/test/CodeGen/X86/vector-fshr-128.ll
  llvm/test/CodeGen/X86/vector-fshr-256.ll
  llvm/test/CodeGen/X86/vector-fshr-rot-128.ll
  llvm/test/CodeGen/X86/vector-fshr-rot-256.ll
  llvm/test/CodeGen/X86/vector-fshr-rot-512.ll
  llvm/test/CodeGen/X86/vector-rotate-128.ll
  llvm/test/CodeGen/X86/vector-rotate-256.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D108139.366650.patch
Type: text/x-patch
Size: 73406 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210816/4317870b/attachment-0001.bin>


More information about the llvm-commits mailing list