[llvm] [VectorCombine] Support pattern `bitop(cast(x), C) -> cast(bitop(x, InvC))` (PR #155216)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 27 01:29:42 PDT 2025


================
@@ -929,6 +930,158 @@ bool VectorCombine::foldBitOpOfCastops(Instruction &I) {
   return true;
 }
 
+struct PreservedCastFlags {
+  bool NNeg = false;
+  bool NUW = false;
+  bool NSW = false;
+};
----------------
RKSimon wrote:

Do we really need this? Especially if we're exposing getLosslessInvCastas a general helper

https://github.com/llvm/llvm-project/pull/155216


More information about the llvm-commits mailing list