[llvm] [Scalarizer][DirectX] support structs return types (PR #111569)

Justin Bogner via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 15 09:06:52 PDT 2024


================
@@ -1195,7 +1261,7 @@ bool ScalarizerVisitor::finish() {
     if (!Op->use_empty()) {
       // The value is still needed, so recreate it using a series of
       // insertelements and/or shufflevectors.
-      Value *Res;
+      Value *Res = nullptr;
----------------
bogner wrote:

I think assigning null here may suppress a "not all paths initialize this variable" type warning if we were to add a code path that doesn't. Given that all of the code paths still do initialize the variable that might not be ideal.

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


More information about the llvm-commits mailing list