[all-commits] [llvm/llvm-project] f53b38: [InstSimplify] select Cond, true, false --> Cond

RotateRight via All-commits all-commits at lists.llvm.org
Thu Jan 9 06:06:37 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: f53b38d12a7b9c6754d5bc91483efab935b5c012
      https://github.com/llvm/llvm-project/commit/f53b38d12a7b9c6754d5bc91483efab935b5c012
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2020-01-09 (Thu, 09 Jan 2020)

  Changed paths:
    M llvm/lib/Analysis/InstructionSimplify.cpp
    M llvm/test/Transforms/InstSimplify/select.ll

  Log Message:
  -----------
  [InstSimplify] select Cond, true, false --> Cond

This is step 1 of damage control assuming that we need to remove several
over-reaching folds for select-of-booleans because they can cause
miscompiles as shown in D72396.

The scalar case seems obviously safe:
https://rise4fun.com/Alive/jSj

And I don't think there's any danger for vectors either - if the
condition is poisoned, then the select must be poisoned too, so undef
elements don't make any difference.

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




More information about the All-commits mailing list