[all-commits] [llvm/llvm-project] 60de14: [InstCombine] add tests for select with frozen con...

Sanjay Patel via All-commits all-commits at lists.llvm.org
Mon Apr 18 12:14:23 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 60de144119abc5848d4fae2f502e05ffae90a970
      https://github.com/llvm/llvm-project/commit/60de144119abc5848d4fae2f502e05ffae90a970
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2022-04-18 (Mon, 18 Apr 2022)

  Changed paths:
    M llvm/test/Transforms/InstCombine/select.ll

  Log Message:
  -----------
  [InstCombine] add tests for select with frozen condition; NFC


  Commit: 3a27b51b2751dba1b3fbef68d647833ab65aa45b
      https://github.com/llvm/llvm-project/commit/3a27b51b2751dba1b3fbef68d647833ab65aa45b
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2022-04-18 (Mon, 18 Apr 2022)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
    M llvm/test/Transforms/InstCombine/select.ll

  Log Message:
  -----------
  [InstCombine] reduce code for freeze of undef

The description was ambiguous about the behavior
when boths select arms are constant or both arms
are not constant. I don't think there's any
evidence to support either way, but this matches
the code with a more specified description.

We can extend this to deal with vector constants
with undef/poison elements. Currently, those don't
get folded anywhere.


Compare: https://github.com/llvm/llvm-project/compare/359dbb0d3daa...3a27b51b2751


More information about the All-commits mailing list