[PATCH] D124552: CodeGenPrepare: Replace constant PHI arguments with switch condition value

Matthias Braun via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 4 11:33:07 PDT 2022


MatzeB updated this revision to Diff 427084.
MatzeB added a comment.

Fixed bug: We must abort the transformations if there is multiple case labels jumping to the same block. This fixes the llvm-test-suite/MultiSource/Applications/JM/lencod I mentioned earlier.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D124552/new/

https://reviews.llvm.org/D124552

Files:
  llvm/include/llvm/CodeGen/TargetLowering.h
  llvm/lib/CodeGen/CodeGenPrepare.cpp
  llvm/lib/CodeGen/TargetLoweringBase.cpp
  llvm/lib/Target/X86/X86ISelLowering.cpp
  llvm/lib/Target/X86/X86ISelLowering.h
  llvm/test/CodeGen/X86/2008-12-01-loop-iv-used-outside-loop.ll
  llvm/test/CodeGen/X86/SwitchLowering.ll
  llvm/test/CodeGen/X86/conditional-tailcall.ll
  llvm/test/CodeGen/X86/switch-phi-const.ll
  llvm/test/CodeGen/X86/switch.ll
  llvm/test/CodeGen/X86/tail-dup-multiple-latch-loop.ll
  llvm/test/CodeGen/X86/tail-opts.ll
  llvm/test/Transforms/CodeGenPrepare/X86/widen_switch.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124552.427084.patch
Type: text/x-patch
Size: 27569 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220504/893e8f30/attachment.bin>


More information about the llvm-commits mailing list