[all-commits] [llvm/llvm-project] 4c3139: [InstCombine] add test for mask op with constant e...

Sanjay Patel via All-commits all-commits at lists.llvm.org
Fri Jun 10 09:44:02 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4c3139d7b935d441cf616c968217b171af5d311a
      https://github.com/llvm/llvm-project/commit/4c3139d7b935d441cf616c968217b171af5d311a
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2022-06-10 (Fri, 10 Jun 2022)

  Changed paths:
    M llvm/test/Transforms/InstCombine/constant-expr-datalayout.ll

  Log Message:
  -----------
  [InstCombine] add test for mask op with constant expression; NFC

This is reduced from the post-commit C example in:
afa192cfb6049a15

That was reverted with:
6fedc6a2b41e458f

This will infinite loop unless that transform or the ones
with casts that can "EvaluateInDifferentType" are limited
to ignore constant expressions.


  Commit: e247b0e5c92185e9e9cce7bae36fab8756085a82
      https://github.com/llvm/llvm-project/commit/e247b0e5c92185e9e9cce7bae36fab8756085a82
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2022-06-10 (Fri, 10 Jun 2022)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
    M llvm/test/Transforms/InstCombine/and.ll
    M llvm/test/Transforms/InstCombine/cast_phi.ll

  Log Message:
  -----------
  [InstCombine] add narrowing transform for low-masked binop with zext operand (2nd try)

The 1st try ( afa192cfb6049a15c55 ) was reverted because it could
cause an infinite loop with constant expressions.

A test for that and an extra condition to enable the transform
are added now. I also added code comments to better describe
the transform and the existing, related transform.

Original commit message:
https://alive2.llvm.org/ce/z/hRy3rE

As shown in D123408, we can produce this pattern when moving
casts around, and we already have a related fold for a binop
with a constant operand.


Compare: https://github.com/llvm/llvm-project/compare/487ace4c7362...e247b0e5c921


More information about the All-commits mailing list