[all-commits] [llvm/llvm-project] 795c24: [InstCombine] foldVecExtTruncToExtElt - extend to ...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Sat Sep 28 09:52:32 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 795c24c6fb4f9635c912f4084fa9339ea068c3d5
      https://github.com/llvm/llvm-project/commit/795c24c6fb4f9635c912f4084fa9339ea068c3d5
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2024-09-28 (Sat, 28 Sep 2024)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
    M llvm/test/Transforms/InstCombine/trunc-extractelement-inseltpoison.ll
    M llvm/test/Transforms/InstCombine/trunc-extractelement.ll

  Log Message:
  -----------
  [InstCombine] foldVecExtTruncToExtElt - extend to handle trunc(lshr(extractelement(x,c1),c2)) -> extractelement(bitcast(x),c3) patterns. (#109689)

This patch moves the existing trunc+extractlement -> extractelement+bitcast fold into a foldVecExtTruncToExtElt helper and extends the helper to handle trunc+lshr+extractelement cases as well.

Fixes #107404



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list