gallium/swr: Fix compilation with LLVM 12
[mesa.git] / src / gallium / drivers / swr / rasterizer / jitter / streamout_jit.cpp
index 13e70a7f90af87e5c3264043a1fcb36ef7bd5eab..60259f093a11afa25ae6dacd95a9fd92d059118b 100644 (file)
@@ -138,7 +138,7 @@ struct StreamOutJit : public BuilderGfxMem
             Value* pAttrib = GEP(pStream, C(4 * decl.attribSlot));
 
             // load 4 components from stream
-            Type* simd4Ty    = VectorType::get(IRB()->getFloatTy(), 4);
+            Type* simd4Ty    = getVectorType(IRB()->getFloatTy(), 4);
             Type* simd4PtrTy = PointerType::get(simd4Ty, 0);
             pAttrib          = BITCAST(pAttrib, simd4PtrTy);
             Value* vattrib   = LOAD(pAttrib);
@@ -314,7 +314,9 @@ struct StreamOutJit : public BuilderGfxMem
         passes.add(createCFGSimplificationPass());
         passes.add(createEarlyCSEPass());
         passes.add(createInstructionCombiningPass());
+#if LLVM_VERSION_MAJOR <= 11
         passes.add(createConstantPropagationPass());
+#endif
         passes.add(createSCCPPass());
         passes.add(createAggressiveDCEPass());