[PATCH] D124552: CodeGenPrepare: Replace constant PHI arguments with switch condition value

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 29 08:15:30 PDT 2022


spatel added a comment.

I think the idea is good, but the implementation is not currently sound. If we are truncating the condition, then we can't later replace a case constant with the condition source unless we mask the high-bits of that source?
I tried to reduce the last test here to show the bug:
https://alive2.llvm.org/ce/z/s5keYc

It would be better to start with only the non-trunc half of this patch, so we can be sure we have that part correct first.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D124552



More information about the llvm-commits mailing list