File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
test/CodeGen/SPIRV/llvm-intrinsics Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -441,11 +441,13 @@ bool SPIRVLegalizerInfo::legalizeIsFPClass(
441441 if (!Ty.isFixedVector ())
442442 return assignSPIRVTy (MIRBuilder.buildConstant (Ty, C));
443443 auto ScalarC = MIRBuilder.buildConstant (Ty.getScalarType (), C);
444- SPIRVType *SPIRVIntEltTy =
445- GR->getOrCreateSPIRVType (LLVMIntTy->getScalarType (), MIRBuilder,
446- SPIRV::AccessQualifier::ReadWrite,
447- /* EmitIR*/ true );
448- GR->assignSPIRVTypeToVReg (SPIRVIntEltTy, ScalarC.getReg (0 ), MF);
444+ assert ((Ty == IntTy || Ty == DstTyCopy) &&
445+ " Unexpected LLT type while lowering constant for G_IS_FPCLASS" );
446+ SPIRVType *VecEltTy = GR->getOrCreateSPIRVType (
447+ (Ty == IntTy ? LLVMIntTy : LLVMDstTy)->getScalarType (), MIRBuilder,
448+ SPIRV::AccessQualifier::ReadWrite,
449+ /* EmitIR*/ true );
450+ GR->assignSPIRVTypeToVReg (VecEltTy, ScalarC.getReg (0 ), MF);
449451 return assignSPIRVTy (MIRBuilder.buildSplatBuildVector (Ty, ScalarC));
450452 };
451453
Original file line number Diff line number Diff line change 3333; CHECK-DAG: %[[#InfFP64:]] = OpConstant %[[#I64Ty]] 9218868437227405312
3434; CHECK-DAG: %[[#NegInfFP64:]] = OpConstant %[[#I64Ty]] 18442240474082181120
3535
36- ; CHECK-DAG: %[[#FalseV4:]] = OpConstantComposite %[[#V4BoolTy]] %[[#Zero ]] %[[#Zero ]] %[[#Zero ]] %[[#Zero ]]
36+ ; CHECK-DAG: %[[#FalseV4:]] = OpConstantComposite %[[#V4BoolTy]] %[[#False ]] %[[#False ]] %[[#False ]] %[[#False ]]
3737; CHECK-DAG: %[[#ValueMaskV4:]] = OpConstantComposite %[[#V4I32Ty]] %[[#ValueMask]] %[[#ValueMask]] %[[#ValueMask]] %[[#ValueMask]]
3838; CHECK-DAG: %[[#InfV4:]] = OpConstantComposite %[[#V4I32Ty]] %[[#Inf]] %[[#Inf]] %[[#Inf]] %[[#Inf]]
3939; CHECK-DAG: %[[#InfWithQnanBitV4:]] = OpConstantComposite %[[#V4I32Ty]] %[[#InfWithQnanBit]] %[[#InfWithQnanBit]] %[[#InfWithQnanBit]] %[[#InfWithQnanBit]]
You can’t perform that action at this time.
0 commit comments