[llvm] [WASM] Fold bitselect with splat zero (PR #147305)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 9 01:39:54 PDT 2025
================
@@ -13158,6 +13158,14 @@ static SDValue combineVSelectWithAllOnesOrZeros(SDValue Cond, SDValue TVal,
return DAG.getBitcast(VT, Or);
}
+ // select Cond, 0, x → and (Cond, !x)
----------------
lukel97 wrote:
Ooops yes, I think thats what was there in the original commit: https://github.com/llvm/llvm-project/pull/147305/commits/b00d0c543c7be82ad936e29ebff45989e2bc461a#diff-b108b15f5b02e0b9f4bafec10de742dfdd4cbe771a86d4ec06389f4b671053c7R3228-R3233
It's a bit confusing the way bitselect has its cond operand in a different place than vselect :)
https://github.com/llvm/llvm-project/pull/147305
More information about the llvm-commits
mailing list