mirror of
https://github.com/KhronosGroup/SPIRV-Tools
synced 2025-01-14 02:10:17 +00:00
Test/DependencyAnalysis: Fix uninitialized variables
This commit is contained in:
parent
df7f00f60e
commit
1c89da46ff
@ -1419,7 +1419,7 @@ TEST(DependencyAnalysis, Crossing) {
|
||||
std::vector<const ir::Loop*> loops{loop};
|
||||
opt::LoopDependenceAnalysis analysis{context.get(), loops};
|
||||
|
||||
const ir::Instruction* store;
|
||||
const ir::Instruction* store = nullptr;
|
||||
for (const ir::Instruction& inst : *spvtest::GetBasicBlock(f, 29)) {
|
||||
if (inst.opcode() == SpvOp::SpvOpStore) {
|
||||
store = &inst;
|
||||
@ -1440,7 +1440,7 @@ TEST(DependencyAnalysis, Crossing) {
|
||||
std::vector<const ir::Loop*> loops{loop};
|
||||
opt::LoopDependenceAnalysis analysis{context.get(), loops};
|
||||
|
||||
const ir::Instruction* store;
|
||||
const ir::Instruction* store = nullptr;
|
||||
for (const ir::Instruction& inst : *spvtest::GetBasicBlock(f, 54)) {
|
||||
if (inst.opcode() == SpvOp::SpvOpStore) {
|
||||
store = &inst;
|
||||
@ -1462,7 +1462,7 @@ TEST(DependencyAnalysis, Crossing) {
|
||||
std::vector<const ir::Loop*> loops{loop};
|
||||
opt::LoopDependenceAnalysis analysis{context.get(), loops};
|
||||
|
||||
const ir::Instruction* store;
|
||||
const ir::Instruction* store = nullptr;
|
||||
for (const ir::Instruction& inst : *spvtest::GetBasicBlock(f, 75)) {
|
||||
if (inst.opcode() == SpvOp::SpvOpStore) {
|
||||
store = &inst;
|
||||
@ -1483,7 +1483,7 @@ TEST(DependencyAnalysis, Crossing) {
|
||||
std::vector<const ir::Loop*> loops{loop};
|
||||
opt::LoopDependenceAnalysis analysis{context.get(), loops};
|
||||
|
||||
const ir::Instruction* store;
|
||||
const ir::Instruction* store = nullptr;
|
||||
for (const ir::Instruction& inst : *spvtest::GetBasicBlock(f, 99)) {
|
||||
if (inst.opcode() == SpvOp::SpvOpStore) {
|
||||
store = &inst;
|
||||
@ -1505,7 +1505,7 @@ TEST(DependencyAnalysis, Crossing) {
|
||||
std::vector<const ir::Loop*> loops{loop};
|
||||
opt::LoopDependenceAnalysis analysis{context.get(), loops};
|
||||
|
||||
const ir::Instruction* store;
|
||||
const ir::Instruction* store = nullptr;
|
||||
for (const ir::Instruction& inst : *spvtest::GetBasicBlock(f, 121)) {
|
||||
if (inst.opcode() == SpvOp::SpvOpStore) {
|
||||
store = &inst;
|
||||
@ -1526,7 +1526,7 @@ TEST(DependencyAnalysis, Crossing) {
|
||||
std::vector<const ir::Loop*> loops{loop};
|
||||
opt::LoopDependenceAnalysis analysis{context.get(), loops};
|
||||
|
||||
const ir::Instruction* store;
|
||||
const ir::Instruction* store = nullptr;
|
||||
for (const ir::Instruction& inst : *spvtest::GetBasicBlock(f, 142)) {
|
||||
if (inst.opcode() == SpvOp::SpvOpStore) {
|
||||
store = &inst;
|
||||
@ -1548,7 +1548,7 @@ TEST(DependencyAnalysis, Crossing) {
|
||||
std::vector<const ir::Loop*> loops{loop};
|
||||
opt::LoopDependenceAnalysis analysis{context.get(), loops};
|
||||
|
||||
const ir::Instruction* store;
|
||||
const ir::Instruction* store = nullptr;
|
||||
for (const ir::Instruction& inst : *spvtest::GetBasicBlock(f, 162)) {
|
||||
if (inst.opcode() == SpvOp::SpvOpStore) {
|
||||
store = &inst;
|
||||
@ -1569,7 +1569,7 @@ TEST(DependencyAnalysis, Crossing) {
|
||||
std::vector<const ir::Loop*> loops{loop};
|
||||
opt::LoopDependenceAnalysis analysis{context.get(), loops};
|
||||
|
||||
const ir::Instruction* store;
|
||||
const ir::Instruction* store = nullptr;
|
||||
for (const ir::Instruction& inst : *spvtest::GetBasicBlock(f, 183)) {
|
||||
if (inst.opcode() == SpvOp::SpvOpStore) {
|
||||
store = &inst;
|
||||
|
@ -170,7 +170,7 @@ TEST(DependencyAnalysisHelpers, UnsupportedLoops) {
|
||||
std::vector<const ir::Loop*> loops{loop};
|
||||
opt::LoopDependenceAnalysis analysis{context.get(), loops};
|
||||
|
||||
const ir::Instruction* store[1];
|
||||
const ir::Instruction* store[1] = {nullptr};
|
||||
int stores_found = 0;
|
||||
for (const ir::Instruction& inst : *spvtest::GetBasicBlock(f, 16)) {
|
||||
if (inst.opcode() == SpvOp::SpvOpStore) {
|
||||
@ -197,7 +197,7 @@ TEST(DependencyAnalysisHelpers, UnsupportedLoops) {
|
||||
std::vector<const ir::Loop*> loops{loop};
|
||||
opt::LoopDependenceAnalysis analysis{context.get(), loops};
|
||||
|
||||
const ir::Instruction* store[1];
|
||||
const ir::Instruction* store[1] = {nullptr};
|
||||
int stores_found = 0;
|
||||
for (const ir::Instruction& inst : *spvtest::GetBasicBlock(f, 47)) {
|
||||
if (inst.opcode() == SpvOp::SpvOpStore) {
|
||||
|
Loading…
Reference in New Issue
Block a user