[all-commits] [llvm/llvm-project] c0b0da: [InstCombine] add test for miscompile from select ...

RotateRight via All-commits all-commits at lists.llvm.org
Mon Apr 5 09:25:58 PDT 2021


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

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

  Log Message:
  -----------
  [InstCombine] add test for miscompile from select value equivalence; NFC

The new test is reduced from:
https://llvm.org/PR49832
...but we already show a potential miscompile in the existing test too.


  Commit: c590a9880d7a660a1c911fce07f3d01ea18be2df
      https://github.com/llvm/llvm-project/commit/c590a9880d7a660a1c911fce07f3d01ea18be2df
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2021-04-05 (Mon, 05 Apr 2021)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
    M llvm/test/Transforms/InstCombine/select-binop-cmp.ll

  Log Message:
  -----------
  [InstCombine] fix potential miscompile in select value equivalence

As shown in the example based on:
https://llvm.org/PR49832
...and the existing test, we can't substitute
a vector value because the equality compare
replacement that we are attempting requires
that the comparison is true for the entire
value. Vector select can be partly true/false.


Compare: https://github.com/llvm/llvm-project/compare/62a94b725cd2...c590a9880d7a


More information about the All-commits mailing list