diff options
Diffstat (limited to 'mlir/lib/Conversion/GPUToSPIRV/ConvertGPUToSPIRV.cpp')
-rw-r--r-- | mlir/lib/Conversion/GPUToSPIRV/ConvertGPUToSPIRV.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mlir/lib/Conversion/GPUToSPIRV/ConvertGPUToSPIRV.cpp b/mlir/lib/Conversion/GPUToSPIRV/ConvertGPUToSPIRV.cpp index 509457d076a..2fd8cedfd63 100644 --- a/mlir/lib/Conversion/GPUToSPIRV/ConvertGPUToSPIRV.cpp +++ b/mlir/lib/Conversion/GPUToSPIRV/ConvertGPUToSPIRV.cpp @@ -127,7 +127,7 @@ ForOpConversion::matchAndRewrite(loop::ForOp forOp, ArrayRef<Value> operands, // Create the new induction variable to use. BlockArgument newIndVar = - header->addArgument(forOperands.lowerBound()->getType()); + header->addArgument(forOperands.lowerBound().getType()); Block *body = forOp.getBody(); // Apply signature conversion to the body of the forOp. It has a single block, @@ -166,7 +166,7 @@ ForOpConversion::matchAndRewrite(loop::ForOp forOp, ArrayRef<Value> operands, // Add the step to the induction variable and branch to the header. Value updatedIndVar = rewriter.create<spirv::IAddOp>( - loc, newIndVar->getType(), newIndVar, forOperands.step()); + loc, newIndVar.getType(), newIndVar, forOperands.step()); rewriter.create<spirv::BranchOp>(loc, header, updatedIndVar); rewriter.eraseOp(forOp); |