[all-commits] [llvm/llvm-project] 5a4769: [InstSimplify] Properly constrain {insert, extract}...

Joe Ellis via All-commits all-commits at lists.llvm.org
Fri May 21 03:05:55 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5a476987f7d653eb7ce2d8ba0ddf0125f481117e
      https://github.com/llvm/llvm-project/commit/5a476987f7d653eb7ce2d8ba0ddf0125f481117e
  Author: Joe Ellis <joe.ellis at arm.com>
  Date:   2021-05-21 (Fri, 21 May 2021)

  Changed paths:
    M llvm/lib/Analysis/InstructionSimplify.cpp
    M llvm/test/Transforms/InstSimplify/insert-vector.ll

  Log Message:
  -----------
  [InstSimplify] Properly constrain {insert,extract}_subvector intrinsic fold

The previous rule:

   (insert_vector _, (extract_vector X, 0), 0) -> X

is not quite correct. The correct fold should be:

   (insert_vector Y, (extract_vector X, 0), 0) -> X
   where: Y is X, or Y is undef

This commit updates the pattern.

Reviewed By: peterwaller-arm, paulwalker-arm

Differential Revision: https://reviews.llvm.org/D102699




More information about the All-commits mailing list