[PATCH] D105020: [SLP]Improve graph reordering.
Alexey Bataev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 3 11:04:39 PDT 2021
ABataev added a comment.
In D105020#2923016 <https://reviews.llvm.org/D105020#2923016>, @aeubanks wrote:
> if you can get alive-tv working from https://github.com/AliveToolkit/alive2
>
> ; ModuleID = '/tmp/b1.ll'
> source_filename = "/tmp/b1.ll"
> target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
> target triple = "x86_64-unknown-linux-gnu"
>
> %"class.deqp::gls::ShaderEvalContext" = type { %"class.tcu::Vector", %"class.tcu::Vector", %"class.tcu::Vector", [4 x %"class.tcu::Vector"], [4 x %"struct.deqp::gls::ShaderEvalContext::ShaderSamp
> ler"], %"class.tcu::Vector", i8, %"class.deqp::gls::QuadGrid"* }
> %"struct.deqp::gls::ShaderEvalContext::ShaderSampler" = type { %"class.tcu::Sampler", %"class.tcu::Texture2D"*, %"class.tcu::TextureCube"*, %"class.tcu::Texture2DArray"*, %"class.tcu::Texture3D"*
> }
> %"class.tcu::Sampler" = type { i32, i32, i32, i32, i32, i32, float, i8, i32, i32, %"class.rr::GenericVec4", i8, i32 }
> %"class.rr::GenericVec4" = type { %union.anon }
> %union.anon = type { [4 x i32] }
> %"class.tcu::Texture2D" = type { %"class.tcu::TextureLevelPyramid", i32, i32, %"class.tcu::Texture2DView" }
> %"class.tcu::TextureLevelPyramid" = type { %"class.tcu::TextureFormat", %"class.std::__Cr::vector", %"class.std::__Cr::vector.1" }
> %"class.tcu::TextureFormat" = type { i32, i32 }
> %"class.std::__Cr::vector" = type { %"class.std::__Cr::__vector_base" }
> %"class.std::__Cr::__vector_base" = type { %"class.de::ArrayBuffer"*, %"class.de::ArrayBuffer"*, %"class.std::__Cr::__compressed_pair" }
> %"class.de::ArrayBuffer" = type { i8*, i64 }
> %"class.std::__Cr::__compressed_pair" = type { %"struct.std::__Cr::__compressed_pair_elem" }
> %"struct.std::__Cr::__compressed_pair_elem" = type { %"class.de::ArrayBuffer"* }
> %"class.std::__Cr::vector.1" = type { %"class.std::__Cr::__vector_base.2" }
> %"class.std::__Cr::__vector_base.2" = type { %"class.tcu::PixelBufferAccess"*, %"class.tcu::PixelBufferAccess"*, %"class.std::__Cr::__compressed_pair.4" }
> %"class.tcu::PixelBufferAccess" = type { %"class.tcu::ConstPixelBufferAccess" }
> %"class.tcu::ConstPixelBufferAccess" = type { %"class.tcu::TextureFormat", %"class.tcu::Vector.3", %"class.tcu::Vector.3", %"class.tcu::Vector.3", i8* }
> %"class.tcu::Vector.3" = type { [3 x i32] }
> %"class.std::__Cr::__compressed_pair.4" = type { %"struct.std::__Cr::__compressed_pair_elem.5" }
> %"struct.std::__Cr::__compressed_pair_elem.5" = type { %"class.tcu::PixelBufferAccess"* }
> %"class.tcu::Texture2DView" = type <{ i32, [4 x i8], %"class.tcu::ConstPixelBufferAccess"*, i8, [7 x i8] }>
> %"class.tcu::TextureCube" = type { %"class.tcu::TextureFormat", i32, [6 x %"class.std::__Cr::vector"], [6 x %"class.std::__Cr::vector.1"], %"class.tcu::TextureCubeView" }
> %"class.tcu::TextureCubeView" = type <{ i32, [4 x i8], [6 x %"class.tcu::ConstPixelBufferAccess"*], i8, [7 x i8] }>
> %"class.tcu::Texture2DArray" = type { %"class.tcu::TextureLevelPyramid", i32, i32, i32, %"class.tcu::Texture2DArrayView" }
> %"class.tcu::Texture2DArrayView" = type { i32, %"class.tcu::ConstPixelBufferAccess"* }
> %"class.tcu::Texture3D" = type { %"class.tcu::TextureLevelPyramid", i32, i32, i32, %"class.tcu::Texture3DView" }
> %"class.tcu::Texture3DView" = type { i32, %"class.tcu::ConstPixelBufferAccess"* }
> %"class.tcu::Vector" = type { [4 x float] }
> %"class.deqp::gls::QuadGrid" = type opaque
>
> define hidden void @_ZN4deqp5gles210Functional19eval_selection_vec4ERNS_3gls17ShaderEvalContextE(%"class.deqp::gls::ShaderEvalContext"* nocapture align 8 dereferenceable(528) %0) {
> %2 = getelementptr inbounds %"class.deqp::gls::ShaderEvalContext", %"class.deqp::gls::ShaderEvalContext"* %0, i64 0, i32 3, i64 0, i32 0, i64 2
> %3 = load float, float* %2, align 8
> %4 = fcmp ogt float %3, 0.000000e+00
> %5 = getelementptr inbounds %"class.deqp::gls::ShaderEvalContext", %"class.deqp::gls::ShaderEvalContext"* %0, i64 0, i32 3, i64 1, i32 0, i64 3
> %6 = load float, float* %5, align 4
> %7 = getelementptr inbounds %"class.deqp::gls::ShaderEvalContext", %"class.deqp::gls::ShaderEvalContext"* %0, i64 0, i32 3, i64 1, i32 0, i64 2
> %8 = load float, float* %7, align 8
> %9 = getelementptr inbounds %"class.deqp::gls::ShaderEvalContext", %"class.deqp::gls::ShaderEvalContext"* %0, i64 0, i32 3, i64 1, i32 0, i64 1
> %10 = load float, float* %9, align 4
> %11 = getelementptr inbounds %"class.deqp::gls::ShaderEvalContext", %"class.deqp::gls::ShaderEvalContext"* %0, i64 0, i32 3, i64 1, i32 0, i64 0
> %12 = load float, float* %11, align 8
> %13 = getelementptr inbounds %"class.deqp::gls::ShaderEvalContext", %"class.deqp::gls::ShaderEvalContext"* %0, i64 0, i32 3, i64 2, i32 0, i64 0
> %14 = load float, float* %13, align 8
> %15 = getelementptr inbounds %"class.deqp::gls::ShaderEvalContext", %"class.deqp::gls::ShaderEvalContext"* %0, i64 0, i32 3, i64 2, i32 0, i64 3
> %16 = load float, float* %15, align 4
> %17 = getelementptr inbounds %"class.deqp::gls::ShaderEvalContext", %"class.deqp::gls::ShaderEvalContext"* %0, i64 0, i32 3, i64 2, i32 0, i64 2
> %18 = load float, float* %17, align 8
> %19 = getelementptr inbounds %"class.deqp::gls::ShaderEvalContext", %"class.deqp::gls::ShaderEvalContext"* %0, i64 0, i32 3, i64 2, i32 0, i64 1
> %20 = load float, float* %19, align 4
> %21 = select i1 %4, float %6, float %14
> %22 = select i1 %4, float %8, float %16
> %23 = select i1 %4, float %10, float %18
> %24 = select i1 %4, float %12, float %20
> %25 = getelementptr inbounds %"class.deqp::gls::ShaderEvalContext", %"class.deqp::gls::ShaderEvalContext"* %0, i64 0, i32 5, i32 0, i64 0
> store float %21, float* %25, align 8
> %26 = getelementptr inbounds %"class.deqp::gls::ShaderEvalContext", %"class.deqp::gls::ShaderEvalContext"* %0, i64 0, i32 5, i32 0, i64 1
> store float %22, float* %26, align 4
> %27 = getelementptr inbounds %"class.deqp::gls::ShaderEvalContext", %"class.deqp::gls::ShaderEvalContext"* %0, i64 0, i32 5, i32 0, i64 2
> store float %23, float* %27, align 8
> %28 = getelementptr inbounds %"class.deqp::gls::ShaderEvalContext", %"class.deqp::gls::ShaderEvalContext"* %0, i64 0, i32 5, i32 0, i64 3
> store float %24, float* %28, align 4
> ret void
> }
>
>
>
> $ bin/opt -passes=slp-vectorizer -S /tmp/b1.ll -o /tmp/b2.ll
> $ alive-tv /tmp/b1.ll /tmp/b2.ll
>
> fails at this commit, and times out at the commit before
> (sorry, couldn't get it working on https://alive2.llvm.org/ for some reason)
>
> seems worth a revert
Yep, I'll revert. The fix is pretty simple but I'll revert and recommit the patch with all the fixes again
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105020/new/
https://reviews.llvm.org/D105020
More information about the llvm-commits
mailing list