Skip to content
Unverified Commit 4c241a93 authored by Yingwei Zheng's avatar Yingwei Zheng
Browse files

[InstCombine] Fold `(-1 + A) & B` into `A ? 0 : B` where A is effectively a bool

Solves issue https://github.com/llvm/llvm-project/issues/63321.

This patch explicitly folds `(-1 + A) & B` into `A ? 0 : B`. Additional trunc will be created when `A` is neither i1 nor <N x i1>.

https://alive2.llvm.org/ce/z/pWv9jJ

Reviewed By: goldstein.w.n

Differential Revision: https://reviews.llvm.org/D153148
parent 71d22586
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment