[mlir][spirv] Check nullptr before usage to fix crash
authorLei Zhang <antiagainst@google.com>
Mon, 4 Apr 2022 21:19:44 +0000 (17:19 -0400)
committerLei Zhang <antiagainst@google.com>
Mon, 4 Apr 2022 21:20:00 +0000 (17:20 -0400)
commitf1a7e508a5e45c00b11b6c7f3e734249059f7956
treeeb7c3cc8b3748b20a22c0fa3139f152564df1a29
parent7ebcd8891a7acc265cee4996d55a287a035f8771
[mlir][spirv] Check nullptr before usage to fix crash

Reviewed By: mravishankar, hanchung

Differential Revision: https://reviews.llvm.org/D123035
mlir/lib/Conversion/ArithmeticToSPIRV/ArithmeticToSPIRV.cpp