Skip to content

Commit 3c7dc4e

Browse files
fix issue with the test
1 parent 927ed63 commit 3c7dc4e

File tree

3 files changed

+14
-11
lines changed

3 files changed

+14
-11
lines changed

llvm/lib/Target/SPIRV/MCTargetDesc/SPIRVInstPrinter.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,14 +284,16 @@ void SPIRVInstPrinter::printInst(const MCInst *MI, uint64_t Address,
284284
}
285285
break;
286286
}
287-
case SPIRV::OpPredicatedLoadINTEL: {
287+
case SPIRV::OpPredicatedLoadINTEL:
288+
case SPIRV::OpPredicatedStoreINTEL: {
288289
const unsigned NumOps = MI->getNumOperands();
289290
if (NumOps > NumFixedOps) {
290291
OS << ' ';
291292
printSymbolicOperand<OperandCategory::MemoryOperandOperand>(
292-
MI, FirstVariableIndex, OS);
293+
MI, NumOps - 1, OS);
293294
break;
294295
}
296+
break;
295297
}
296298
default:
297299
printRemainingVariableOps(MI, NumFixedOps, OS);

llvm/lib/Target/SPIRV/SPIRVBuiltins.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2432,6 +2432,7 @@ static bool generatePredicatedLoadStoreInst(const SPIRV::IncomingCall *Call,
24322432
if(ArgSz > 3) {
24332433
LiteralIdx = 3;
24342434
}
2435+
24352436
SmallVector<uint32_t, 1> ImmArgs;
24362437
MachineRegisterInfo *MRI = MIRBuilder.getMRI();
24372438
if (LiteralIdx > 0)

llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_predicated_io/predicated_io_generic.ll

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,18 @@
99
; CHECK-DAG: Extension "SPV_INTEL_predicated_io"
1010

1111
; CHECK-DAG: %[[Int32Ty:[0-9]+]] = OpTypeInt 32 0
12-
; CHECK-DAG: %[[VoidTy:[0-9]+]] = OpTypeVoid
1312
; CHECK-DAG: %[[IntPtrTy:[0-9]+]] = OpTypePointer CrossWorkgroup %[[Int32Ty]]
1413
; CHECK-DAG: %[[BoolTy:[0-9]+]] = OpTypeBool
15-
; CHECK: %[[LoadPtr:]] = FunctionParameter %[[IntPtrTy]]
16-
; CHECK: %[[StorePtr:]] = FunctionParameter %[[IntPtrTy]]
17-
; CHECK: %[[DefaultVal:]] = FunctionParameter %[[Int32Ty]]
18-
; CHECK: %[[StoreObj:]] = FunctionParameter %[[Int32Ty]]
19-
; CHECK: %[[Predicate:]] = FunctionParameter %[[BoolTy]]
14+
; CHECK-DAG: %[[VoidTy:[0-9]+]] = OpTypeVoid
15+
; CHECK: %[[LoadPtr:[0-9]+]] = OpFunctionParameter %[[IntPtrTy]]
16+
; CHECK: %[[StorePtr:[0-9]+]] = OpFunctionParameter %[[IntPtrTy]]
17+
; CHECK: %[[DefaultVal:[0-9]+]] = OpFunctionParameter %[[Int32Ty]]
18+
; CHECK: %[[StoreObj:[0-9]+]] = OpFunctionParameter %[[Int32Ty]]
19+
; CHECK: %[[Predicate:[0-9]+]] = OpFunctionParameter %[[BoolTy]]
2020
; CHECK: PredicatedLoadINTEL %[[Int32Ty]] %[[LoadPtr]] %[[Predicate]] %[[DefaultVal]]
21-
; CHECK: PredicatedLoadINTEL %[[Int32Ty]] %[[LoadPtr]] %[[Predicate]] %[[DefaultVal]] 0
21+
; CHECK: PredicatedLoadINTEL %[[Int32Ty]] %[[LoadPtr]] %[[Predicate]] %[[DefaultVal]] None
2222
; CHECK: PredicatedStoreINTEL %[[StorePtr]] %[[StoreObj]] %[[Predicate]]
23-
; CHECK: PredicatedStoreINTEL %[[StorePtr]] %[[StoreObj]] %[[Predicate]] 0
23+
; CHECK: PredicatedStoreINTEL %[[StorePtr]] %[[StoreObj]] %[[Predicate]] None
2424

2525
define spir_func void @foo(ptr addrspace(1) %load_pointer, ptr addrspace(1) %store_pointer, i32 %default_value, i32 %store_object, i1 zeroext %predicate) {
2626
entry:
@@ -34,4 +34,4 @@ entry:
3434
declare spir_func i32 @_Z27__spirv_PredicatedLoadINTELPU3AS1Kibi(ptr addrspace(1), i1, i32)
3535
declare spir_func i32 @_Z27__spirv_PredicatedLoadINTELPU3AS1Kibii(ptr addrspace(1), i1, i32, i32)
3636
declare spir_func void @_Z28__spirv_PredicatedStoreINTELPU3AS1Kiib(ptr addrspace(1), i32, i1)
37-
declare spir_func void @_Z28__spirv_PredicatedStoreINTELPU3AS1Kiibi(ptr addrspace(1), i32, i1, i32)
37+
declare spir_func void @_Z28__spirv_PredicatedStoreINTELPU3AS1Kiibi(ptr addrspace(1), i32, i1, i32)

0 commit comments

Comments
 (0)