@@ -4298,8 +4298,8 @@ void EmitPass::Sub(const SSource sources[2], const DstModifier &modifier) {
42984298
42994299 if (IGC_IS_FLAG_ENABLED(EnableVectorEmitter) && IsPossible) {
43004300
4301- IGC_ASSERT_EXIT_MESSAGE (m_encoder->GetSimdSize() == lanesToSIMDMode(16),
4302- "As of now Vector Emission is only supported for SIMD16");
4301+ IGC_ASSERT_MESSAGE (m_encoder->GetSimdSize() == lanesToSIMDMode(16),
4302+ "As of now Vector Emission is only supported for SIMD16");
43034303
43044304 unsigned VectorSize = getVectorSize(sources[0].value);
43054305 IGC_ASSERT_MESSAGE(VectorSize == getVectorSize(sources[1].value), "operands must have same vector types");
@@ -4389,8 +4389,8 @@ void EmitPass::Add(const SSource sources[2], const DstModifier &modifier) {
43894389
43904390 if (IGC_IS_FLAG_ENABLED(EnableVectorEmitter) && IsPossible) {
43914391
4392- IGC_ASSERT_EXIT_MESSAGE (numLanes(m_encoder->GetSimdSize()) == 16,
4393- "As of now Vector Emission is only supported for SIMD16");
4392+ IGC_ASSERT_MESSAGE (numLanes(m_encoder->GetSimdSize()) == 16,
4393+ "As of now Vector Emission is only supported for SIMD16");
43944394
43954395 bool AllUniform = src[0]->IsUniform() && src[1]->IsUniform() && m_destination->IsUniform();
43964396 // cannot emit 16 SIMD if SIMD SIZE is set to 8, but can emit 4
@@ -4448,8 +4448,8 @@ void EmitPass::Mul(const SSource sources[2], const DstModifier &modifier) {
44484448
44494449 if (IGC_IS_FLAG_ENABLED(EnableVectorEmitter) && IsPossible) {
44504450
4451- IGC_ASSERT_EXIT_MESSAGE (numLanes(m_encoder->GetSimdSize()) == 16,
4452- "As of now Vector Emission is only supported for SIMD16");
4451+ IGC_ASSERT_MESSAGE (numLanes(m_encoder->GetSimdSize()) == 16,
4452+ "As of now Vector Emission is only supported for SIMD16");
44534453 unsigned VectorSize = getVectorSize(sources[0].value);
44544454 IGC_ASSERT_MESSAGE(VectorSize == getVectorSize(sources[1].value), "operands must have same vector types");
44554455
@@ -4528,8 +4528,8 @@ void EmitPass::Div(const SSource sources[2], const DstModifier &modifier) {
45284528 if (IGC_IS_FLAG_ENABLED(EnableVectorEmitter) && sources[0].value->getType()->isVectorTy() &&
45294529 sources[1].value->getType()->isVectorTy()) {
45304530
4531- IGC_ASSERT_EXIT_MESSAGE (numLanes(m_encoder->GetSimdSize()) == 16,
4532- "As of now Vector Emission is only supported for SIMD16");
4531+ IGC_ASSERT_MESSAGE (numLanes(m_encoder->GetSimdSize()) == 16,
4532+ "As of now Vector Emission is only supported for SIMD16");
45334533 unsigned VectorSize = getVectorSize(sources[0].value);
45344534
45354535 for (unsigned i = 0; i < VectorSize; ++i) {
@@ -4561,8 +4561,8 @@ void EmitPass::Inv(const SSource sources[2], const DstModifier &modifier) {
45614561 if (IGC_IS_FLAG_ENABLED(EnableVectorEmitter) && sources[0].value->getType()->isVectorTy() &&
45624562 sources[1].value->getType()->isVectorTy()) {
45634563
4564- IGC_ASSERT_EXIT_MESSAGE (numLanes(m_encoder->GetSimdSize()) == 16,
4565- "As of now Vector Emission is only supported for SIMD16");
4564+ IGC_ASSERT_MESSAGE (numLanes(m_encoder->GetSimdSize()) == 16,
4565+ "As of now Vector Emission is only supported for SIMD16");
45664566 unsigned VectorSize = getVectorSize(sources[0].value);
45674567
45684568 CVariable *src[1];
@@ -4596,8 +4596,8 @@ void EmitPass::MaxNum(const SSource sources[2], const DstModifier &modifier) {
45964596 if (IGC_IS_FLAG_ENABLED(EnableVectorEmitter) && sources[0].value->getType()->isVectorTy() &&
45974597 sources[1].value->getType()->isVectorTy()) {
45984598
4599- IGC_ASSERT_EXIT_MESSAGE (numLanes(m_encoder->GetSimdSize()) == 16,
4600- "As of now Vector Emission is only supported for SIMD16");
4599+ IGC_ASSERT_MESSAGE (numLanes(m_encoder->GetSimdSize()) == 16,
4600+ "As of now Vector Emission is only supported for SIMD16");
46014601 unsigned VectorSize = getVectorSize(sources[0].value);
46024602
46034603 bool AllUniform = src[0]->IsUniform() && src[1]->IsUniform() && m_destination->IsUniform();
@@ -4640,16 +4640,16 @@ void EmitPass::MaxNum(const SSource sources[2], const DstModifier &modifier) {
46404640 return;
46414641 }
46424642
4643- IGC_ASSERT_EXIT_MESSAGE (0, " if we are at this part, something went wrong "
4644- "with maxnum vectorization");
4643+ IGC_ASSERT_MESSAGE (0, " if we are at this part, something went wrong "
4644+ "with maxnum vectorization");
46454645}
46464646
46474647void EmitPass::Exp2(const SSource sources[2], const DstModifier &modifier) {
46484648
46494649 if (IGC_IS_FLAG_ENABLED(EnableVectorEmitter) && sources[0].value->getType()->isVectorTy()) {
46504650
4651- IGC_ASSERT_EXIT_MESSAGE (m_encoder->GetSimdSize() == lanesToSIMDMode(16),
4652- "As of now Vector Emission is only supported for SIMD16");
4651+ IGC_ASSERT_MESSAGE (m_encoder->GetSimdSize() == lanesToSIMDMode(16),
4652+ "As of now Vector Emission is only supported for SIMD16");
46534653
46544654 unsigned VectorSize = getVectorSize(sources[0].value);
46554655
@@ -4747,8 +4747,8 @@ void EmitPass::FDiv(const SSource sources[2], const DstModifier &modifier) {
47474747
47484748 if (IGC_IS_FLAG_ENABLED(EnableVectorEmitter) && IsPossible) {
47494749
4750- IGC_ASSERT_EXIT_MESSAGE (numLanes(m_encoder->GetSimdSize()) == 16,
4751- "As of now Vector Emission is only supported for SIMD16");
4750+ IGC_ASSERT_MESSAGE (numLanes(m_encoder->GetSimdSize()) == 16,
4751+ "As of now Vector Emission is only supported for SIMD16");
47524752 if (isVectorOfOnes(sources[0].value))
47534753 Inv(sources, modifier);
47544754 else
@@ -4807,8 +4807,8 @@ void EmitPass::VectorCMP(llvm::CmpInst::Predicate pred, const SSource sources[2]
48074807 dst = m_currShader->BitCast(m_destination, src[0]->GetType());
48084808 }
48094809
4810- IGC_ASSERT_EXIT_MESSAGE (numLanes(m_encoder->GetSimdSize()) == 16,
4811- "As of now Vector Emission is only supported for SIMD16");
4810+ IGC_ASSERT_MESSAGE (numLanes(m_encoder->GetSimdSize()) == 16,
4811+ "As of now Vector Emission is only supported for SIMD16");
48124812 unsigned VectorSize = getVectorSize(sources[0].value);
48134813
48144814 bool AllUniform = src[0]->IsUniform() && src[1]->IsUniform() && m_destination->IsUniform();
@@ -4818,7 +4818,6 @@ void EmitPass::VectorCMP(llvm::CmpInst::Predicate pred, const SSource sources[2]
48184818 bool CanEmitThisSize = VectorSize <= SIMDSize;
48194819
48204820 if (IGC_IS_FLAG_ENABLED(VectorizerUniformValueVectorizationEnabled) && AllUniform && CanEmitThisSize) {
4821-
48224821 m_encoder->SetSrcRegion(0, 1, 1, 0);
48234822 m_encoder->SetSrcRegion(1, 1, 1, 0);
48244823 m_encoder->SetUniformSIMDSize(lanesToSIMDMode(VectorSize));
@@ -5025,6 +5024,7 @@ void EmitPass::VectorSelect(const SSource sources[3], const DstModifier &modifie
50255024 }
50265025
50275026 bool PredicateLengthIsCorrect = flag->GetNumberElement() == 1 || flag->GetNumberElement() == SIMDSize;
5027+
50285028 IGC_ASSERT_EXIT_MESSAGE(PredicateLengthIsCorrect, "we can only emit non-uniform selects with matching predicate");
50295029
50305030 for (unsigned i = 0; i < VectorSize; ++i) {
0 commit comments