[llvm] [InstSimplify] Stop propagating `undef` when element is demanded (PR #75746)

via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 17 10:29:44 PST 2023


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff 6655581038f8479f0f6942b7d34cbd6556d00a0e 2797317b8049f7a73abab11fa70708bf51be2c19 -- llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp b/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
index 4e314780c1..2490f5b9b9 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
@@ -1378,7 +1378,7 @@ Value *InstCombinerImpl::SimplifyDemandedVectorElts(Value *V,
       if (!Elt) return nullptr;
 
       Elts.push_back(Elt);
-      if (isa<PoisonValue>(Elt))   // Already poison.
+      if (isa<PoisonValue>(Elt)) // Already poison.
         UndefElts.setBit(i);
     }
 

``````````

</details>


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


More information about the llvm-commits mailing list