[PATCH] D101191: [InstCombine] Fully disable select to and/or i1 folding

Jordan Rupprecht via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 26 09:51:45 PDT 2021


rupprecht added a comment.

FYI, I'm seeing what I think is a miscompile that bisects to this patch. Greatly simplified, the problematic snippet is this:

  struct Stats {
    int a;
    int b;
    int a_or_b;
  };
  
  bool x = ...
  bool y = ...
  Stats stats;
  stats.a = x ? 1 : 0;
  stats.b = y ? 1 : 0;
  stats.a_or_b = (x || y) ? 1 : 0;

What we see is that when x is false and y is true, a is 0 (expected), b is 1 (expected), but a_or_b is 0 (unexpected).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101191/new/

https://reviews.llvm.org/D101191



More information about the llvm-commits mailing list