Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pre-commit: test PR76295 #36

Closed
wants to merge 2 commits into from
Closed

pre-commit: test PR76295 #36

wants to merge 2 commits into from

Conversation

dtcxzyw
Copy link
Owner

@dtcxzyw dtcxzyw commented Dec 23, 2023

Copy link
Contributor

baseline: llvm/llvm-project@acacec3
patch: llvm/llvm-project#76295
sha256: 794111f3535c3fc45123077df82520d264e9ce7d915f44d7e8f7c8f3f0185efc
commit: 013cb30
013cb30 pre-commit: Update
bench/abseil-cpp/optimized/cord_rep_btree.cc.ll
bench/abseil-cpp/optimized/graphcycles_test.cc.ll
bench/assimp/optimized/3DSExporter.cpp.ll
bench/assimp/optimized/AssbinFileWriter.cpp.ll
bench/assimp/optimized/AssbinLoader.cpp.ll
bench/assimp/optimized/BlenderLoader.cpp.ll
bench/assimp/optimized/COBLoader.cpp.ll
bench/assimp/optimized/ColladaExporter.cpp.ll
bench/assimp/optimized/FBXExportProperty.cpp.ll
bench/assimp/optimized/MD3Loader.cpp.ll
bench/assimp/optimized/OpenGEXImporter.cpp.ll
bench/assimp/optimized/Q3DLoader.cpp.ll
bench/assimp/optimized/glTFExporter.cpp.ll
bench/assimp/optimized/json_exporter.cpp.ll
bench/bullet3/optimized/btDantzigLCP.ll
bench/cpython/optimized/_hashopenssl.ll
bench/cpython/optimized/arraymodule.ll
bench/cpython/optimized/basearith.ll
bench/cpython/optimized/codecs.ll
bench/cpython/optimized/compile.ll
bench/cpython/optimized/hamt.ll
bench/cpython/optimized/mem.ll
bench/cpython/optimized/mpdecimal.ll
bench/cpython/optimized/unicodedata.ll
bench/duckdb/optimized/ub_duckdb_aggr_holistic.cpp.ll
bench/eastl/optimized/TestRingBuffer.cpp.ll
bench/flac/optimized/metadata_iterators.c.ll
bench/flac/optimized/stream_encoder.c.ll
bench/flatbuffers/optimized/idl_gen_json_schema.cpp.ll
bench/flatbuffers/optimized/idl_gen_rust.cpp.ll
bench/flatbuffers/optimized/idl_gen_text.cpp.ll
bench/flatbuffers/optimized/idl_parser.cpp.ll
bench/flatbuffers/optimized/java_generator.cc.ll
bench/flatbuffers/optimized/reflection.cpp.ll
bench/folly/optimized/Compression.cpp.ll
bench/folly/optimized/Zlib.cpp.ll
bench/folly/optimized/Zstd.cpp.ll
bench/folly/optimized/json.cpp.ll
bench/grpc/optimized/work_serializer.cc.ll
bench/hermes/optimized/ConvertUTF.cpp.ll
bench/hermes/optimized/ES6Class.cpp.ll
bench/hermes/optimized/ESTreeIRGen-expr.cpp.ll
bench/hermes/optimized/MicrosoftDemangle.cpp.ll
bench/icu/optimized/name2uni.ll
bench/icu/optimized/rle.ll
bench/icu/optimized/ucnv2022.ll
bench/icu/optimized/ucnvmbcs.ll
bench/icu/optimized/ucnvscsu.ll
bench/icu/optimized/ucptrie.ll
bench/icu/optimized/umsg.ll
bench/icu/optimized/umutablecptrie.ll
bench/icu/optimized/uniset_props.ll
bench/icu/optimized/utrie2.ll
bench/icu/optimized/utrie2_builder.ll
bench/icu/optimized/utrie_swap.ll
bench/icu/optimized/vtzone.ll
bench/libevent/optimized/http.c.ll
bench/libuv/optimized/core.c.ll
bench/llama.cpp/optimized/llama.cpp.ll
bench/lua/optimized/lstrlib.ll
bench/luajit/optimized/buildvm.ll
bench/luajit/optimized/lj_cparse.ll
bench/luajit/optimized/lj_cparse_dyn.ll
bench/luajit/optimized/minilua.ll
bench/lz4/optimized/lz4frame.c.ll
bench/memcached/optimized/jenkins_hash.ll
bench/memcached/optimized/memcached-jenkins_hash.ll
bench/memcached/optimized/memcached_debug-jenkins_hash.ll
bench/nlohmann_json/optimized/unit-allocator.cpp.ll
bench/node/optimized/libnode.crypto_rsa.ll
bench/node/optimized/libnode.node_errors.ll
bench/node/optimized/libnode.node_file.ll
bench/node/optimized/libnode.node_sockaddr.ll
bench/node/optimized/simdutf.ll
bench/nuklear/optimized/unity.c.ll
bench/ocio/optimized/CTFReaderHelper.cpp.ll
bench/ocio/optimized/Op.cpp.ll
bench/oiio/optimized/hashes.cpp.ll
bench/openexr/optimized/ImfCheckFile.cpp.ll
bench/openssl/optimized/libcrypto-lib-asymcipher.ll
bench/openssl/optimized/libcrypto-lib-cbc_cksm.ll
bench/openssl/optimized/libcrypto-lib-cms_env.ll
bench/openssl/optimized/libcrypto-lib-exchange.ll
bench/openssl/optimized/libcrypto-lib-kem.ll
bench/openssl/optimized/libcrypto-lib-m_sigver.ll
bench/openssl/optimized/libcrypto-lib-pcbc_enc.ll
bench/openssl/optimized/libcrypto-lib-signature.ll
bench/openssl/optimized/libcrypto-lib-v3_addr.ll
bench/openssl/optimized/libcrypto-lib-v3_utl.ll
bench/openssl/optimized/libcrypto-shlib-asymcipher.ll
bench/openssl/optimized/libcrypto-shlib-cbc_cksm.ll
bench/openssl/optimized/libcrypto-shlib-cms_env.ll
bench/openssl/optimized/libcrypto-shlib-exchange.ll
bench/openssl/optimized/libcrypto-shlib-kem.ll
bench/openssl/optimized/libcrypto-shlib-m_sigver.ll
bench/openssl/optimized/libcrypto-shlib-pcbc_enc.ll
bench/openssl/optimized/libcrypto-shlib-signature.ll
bench/openssl/optimized/libcrypto-shlib-v3_addr.ll
bench/openssl/optimized/libcrypto-shlib-v3_utl.ll

@nikic
Copy link

nikic commented Dec 30, 2023

bench/abseil-cpp/optimized/cord_rep_btree.cc.ll looks like a regression.

@dtcxzyw
Copy link
Owner Author

dtcxzyw commented Dec 31, 2023

bench/abseil-cpp/optimized/cord_rep_btree.cc.ll looks like a regression.

Context:


%retval.sroa.5.0.i.i.i = phi i32 [ 0, %if.then.i.i.i ], [ 0, %if.then.i.i.i.i ], [ 1, %if.else.i.i.i ], [ 1, %for.body.i.i.i ]
%retval.sroa.3.0.i = phi i32 [ 0, %if.then6 ], [ 1, %cond.false.i ], [ 1, %for.body.i.i ]

do.body.i.i:
%result.sroa.7.0.i.i = phi i32 [ %retval.sroa.3.0.i, %do.body.preheader.i.i ], [ %result.sroa.7.1.i.i, %do.cond.i.i ]
switch i32 %result.sroa.7.0.i.i, label %do.cond.i.i [
  i32 2, label %sw.bb.i.i
  i32 1, label %sw.bb4.i.i
  i32 0, label %sw.bb13.i.i
]

%sw.bb.i.i: ; preds = %do.body.i.i
%28 = extractvalue { ptr, i32 } %call.i.i, 1 ; range: [0, 3)

%do.cond.i.i:
%result.sroa.7.1.i.i = phi i32 [ %result.sroa.7.0.i.i, %do.body.i.i ], 
[ %retval.sroa.5.0.i.i.i, %_ZN4absl13cord_internal12CordRepBtree7SetEdgeILNS1_8EdgeTypeE0EEENS1_8OpResultEbPNS0_7CordRepEm.exit.i.i ], 
[ %28, %sw.bb.i.i ]

A minimal reproduction:

define i32 @test(i32 %a, i32 %b) {
entry:
  %c = urem i32 %a, 2
  br label %body
body:
  %phi = phi i32 [%c, %entry], [%phi.i, %latch]
  switch i32 %phi, label %latch [
    i32 2, label %bb2
    i32 1, label %bb1
    i32 0, label %bb1
  ]
bb1:
  call void @side_effect()
  %val1 = urem i32 %b, 2
  br label %latch
bb2:
  %val2 = call i32 @call()
  br label %latch
latch:
  %phi.i = phi i32 [%phi, %body], [%val1, %bb1], [%val2, %bb2]
  %cond = call i1 @use()
  br i1 %cond, label %body, label %exit
exit:
  ret i32 0
}

declare i32 @call()
declare i1 @use()
declare void @side_effect()

I cannot reproduce the regression. Does it reach the maximum recursion depth when computing the constant range?

Copy link
Contributor

github-actions bot commented Jan 7, 2024

baseline: llvm/llvm-project@752df2b
patch: llvm/llvm-project#76295
sha256: 794111f3535c3fc45123077df82520d264e9ce7d915f44d7e8f7c8f3f0185efc
commit: 3b8c853
3b8c853 pre-commit: Update
bench/abseil-cpp/optimized/cord_rep_btree.cc.ll
bench/abseil-cpp/optimized/graphcycles_test.cc.ll
bench/assimp/optimized/3DSExporter.cpp.ll
bench/assimp/optimized/AssbinFileWriter.cpp.ll
bench/assimp/optimized/AssbinLoader.cpp.ll
bench/assimp/optimized/BlenderLoader.cpp.ll
bench/assimp/optimized/COBLoader.cpp.ll
bench/assimp/optimized/ColladaExporter.cpp.ll
bench/assimp/optimized/FBXExportProperty.cpp.ll
bench/assimp/optimized/MD3Loader.cpp.ll
bench/assimp/optimized/OpenGEXImporter.cpp.ll
bench/assimp/optimized/Q3DLoader.cpp.ll
bench/assimp/optimized/glTFExporter.cpp.ll
bench/assimp/optimized/json_exporter.cpp.ll
bench/bullet3/optimized/btDantzigLCP.ll
bench/cpython/optimized/_hashopenssl.ll
bench/cpython/optimized/arraymodule.ll
bench/cpython/optimized/basearith.ll
bench/cpython/optimized/codecs.ll
bench/cpython/optimized/compile.ll
bench/cpython/optimized/mem.ll
bench/cpython/optimized/mpdecimal.ll
bench/duckdb/optimized/ub_duckdb_aggr_holistic.cpp.ll
bench/eastl/optimized/TestRingBuffer.cpp.ll
bench/flac/optimized/metadata_iterators.c.ll
bench/flac/optimized/stream_encoder.c.ll
bench/flatbuffers/optimized/idl_gen_json_schema.cpp.ll
bench/flatbuffers/optimized/idl_gen_rust.cpp.ll
bench/flatbuffers/optimized/idl_gen_text.cpp.ll
bench/flatbuffers/optimized/idl_parser.cpp.ll
bench/flatbuffers/optimized/java_generator.cc.ll
bench/flatbuffers/optimized/reflection.cpp.ll
bench/folly/optimized/Compression.cpp.ll
bench/folly/optimized/Zlib.cpp.ll
bench/folly/optimized/Zstd.cpp.ll
bench/folly/optimized/json.cpp.ll
bench/hermes/optimized/BytecodeDisassembler.cpp.ll
bench/hermes/optimized/ConvertUTF.cpp.ll
bench/hermes/optimized/MicrosoftDemangle.cpp.ll
bench/icu/optimized/name2uni.ll
bench/icu/optimized/rle.ll
bench/icu/optimized/ucnv2022.ll
bench/icu/optimized/ucnvmbcs.ll
bench/icu/optimized/ucnvscsu.ll
bench/icu/optimized/ucptrie.ll
bench/icu/optimized/umsg.ll
bench/icu/optimized/umutablecptrie.ll
bench/icu/optimized/uniset_props.ll
bench/icu/optimized/utrie2.ll
bench/icu/optimized/utrie2_builder.ll
bench/icu/optimized/utrie_swap.ll
bench/icu/optimized/vtzone.ll
bench/libevent/optimized/http.c.ll
bench/libuv/optimized/core.c.ll
bench/llama.cpp/optimized/llama.cpp.ll
bench/lua/optimized/lstrlib.ll
bench/luajit/optimized/buildvm.ll
bench/luajit/optimized/lj_cparse.ll
bench/luajit/optimized/lj_cparse_dyn.ll
bench/luajit/optimized/minilua.ll
bench/memcached/optimized/jenkins_hash.ll
bench/memcached/optimized/memcached-jenkins_hash.ll
bench/memcached/optimized/memcached_debug-jenkins_hash.ll
bench/nlohmann_json/optimized/unit-allocator.cpp.ll
bench/node/optimized/libnode.crypto_rsa.ll
bench/node/optimized/libnode.node_errors.ll
bench/node/optimized/libnode.node_sockaddr.ll
bench/node/optimized/simdutf.ll
bench/nuklear/optimized/unity.c.ll
bench/ocio/optimized/CTFReaderHelper.cpp.ll
bench/ocio/optimized/Op.cpp.ll
bench/oiio/optimized/hashes.cpp.ll
bench/openssl/optimized/libcrypto-lib-asymcipher.ll
bench/openssl/optimized/libcrypto-lib-cbc_cksm.ll
bench/openssl/optimized/libcrypto-lib-exchange.ll
bench/openssl/optimized/libcrypto-lib-kem.ll
bench/openssl/optimized/libcrypto-lib-m_sigver.ll
bench/openssl/optimized/libcrypto-lib-pcbc_enc.ll
bench/openssl/optimized/libcrypto-lib-signature.ll
bench/openssl/optimized/libcrypto-lib-v3_addr.ll
bench/openssl/optimized/libcrypto-lib-v3_utl.ll
bench/openssl/optimized/libcrypto-shlib-asymcipher.ll
bench/openssl/optimized/libcrypto-shlib-cbc_cksm.ll
bench/openssl/optimized/libcrypto-shlib-exchange.ll
bench/openssl/optimized/libcrypto-shlib-kem.ll
bench/openssl/optimized/libcrypto-shlib-m_sigver.ll
bench/openssl/optimized/libcrypto-shlib-pcbc_enc.ll
bench/openssl/optimized/libcrypto-shlib-signature.ll
bench/openssl/optimized/libcrypto-shlib-v3_addr.ll
bench/openssl/optimized/libcrypto-shlib-v3_utl.ll
bench/openssl/optimized/libdefault-lib-ecx_kmgmt.ll
bench/openssl/optimized/libssl-lib-quic_txp.ll
bench/openssl/optimized/libssl-shlib-quic_txp.ll
bench/openssl/optimized/libtestutil-lib-provider.ll
bench/openssl/optimized/openssl-bin-rsautl.ll
bench/openssl/optimized/openssl-bin-s_client.ll
bench/openssl/optimized/openssl-bin-storeutl.ll
bench/openssl/optimized/shlibloadtest-bin-shlibloadtest.ll
bench/openssl/optimized/ssl_test-bin-handshake.ll

@dtcxzyw
Copy link
Owner Author

dtcxzyw commented Jan 8, 2024

bench/abseil-cpp/optimized/cord_rep_btree.cc.ll looks like a regression.

Reproduction: https://godbolt.org/z/197j7r3G5

define dso_local void @test() local_unnamed_addr {
entry:
  %0 = tail call i8 @geti8()
  %conv.i = zext i8 %0 to i32
  %cmp19.i.not = tail call i1 @geti1()
  br i1 %cmp19.i.not, label %while.end.i.thread, label %exit2

while.end.i.thread:                               ; preds = %entry
  %1 = tail call i1 @geti1()
  %2 = zext i1 %1 to i32
  br label %exit2

exit2:                                            ; preds = %while.end.i.thread, %entry
  %cmp.i12.i4 = phi i32 [ %2, %while.end.i.thread ], [ 0, %entry ]
  %cmp = tail call i1 @geti1()
  br i1 %cmp, label %if.then6, label %if.end.i.i

if.then6:                                         ; preds = %exit2
  %cmp.i32 = icmp ugt i32 %cmp.i12.i4, %conv.i
  br i1 %cmp.i32, label %exit, label %cond.false.i

cond.false.i:                                     ; preds = %if.then6
  %cmp.not6.i.i = tail call i1 @geti1()
  br i1 %cmp.not6.i.i, label %exit, label %for.body.preheader.i.i

for.body.preheader.i.i:                           ; preds = %cond.false.i
  %cmp.not.i.i = tail call i1 @geti1()
  br label %exit

exit:                                             ; preds = %for.body.preheader.i.i, %cond.false.i, %if.then6
  %retval.sroa.3.0.i = phi i32 [ 0, %if.then6 ], [ 1, %cond.false.i ], [ 1, %for.body.preheader.i.i ]
  br i1 %cmp19.i.not, label %if.end.i.i, label %do.body.i.i

do.body.i.i:                                      ; preds = %exit, %do.cond.i.i
  %result.sroa.7.0.i.i = phi i32 [ %result.sroa.7.1.i.i, %do.cond.i.i ], [ %retval.sroa.3.0.i, %exit ]
  switch i32 %result.sroa.7.0.i.i, label %do.cond.i.i [
    i32 2, label %sw.bb.i.i
    i32 1, label %if.end.i.i
    i32 0, label %if.end.i.i
  ]

sw.bb.i.i:                                        ; preds = %do.body.i.i
  %3 = tail call i32 @geti32()
  br label %do.cond.i.i

do.cond.i.i:                                      ; preds = %sw.bb.i.i, %do.body.i.i
  %result.sroa.7.1.i.i = phi i32 [ %result.sroa.7.0.i.i, %do.body.i.i ], [ %3, %sw.bb.i.i ]
  %cmp22.i.i = tail call i1 @geti1()
  br i1 %cmp22.i.i, label %do.body.i.i, label %if.end.i.i, !llvm.loop !5

if.end.i.i:                                       ; preds = %do.cond.i.i, %do.body.i.i, %do.body.i.i, %exit, %exit2
  ret void
}

declare i8 @geti8() local_unnamed_addr

declare i32 @geti32() local_unnamed_addr

declare i1 @geti1() local_unnamed_addr

!llvm.module.flags = !{!0, !1, !2, !3, !4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{i32 7, !"frame-pointer", i32 2}
!5 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}

%result.sroa.7.0.i.i was marked as overdefined because we reached the max widen steps.

@dtcxzyw
Copy link
Owner Author

dtcxzyw commented Jan 8, 2024

bench/abseil-cpp/optimized/cord_rep_btree.cc.ll looks like a regression.

Reproduction: https://godbolt.org/z/197j7r3G5

define dso_local void @test() local_unnamed_addr {
entry:
  %0 = tail call i8 @geti8()
  %conv.i = zext i8 %0 to i32
  %cmp19.i.not = tail call i1 @geti1()
  br i1 %cmp19.i.not, label %while.end.i.thread, label %exit2

while.end.i.thread:                               ; preds = %entry
  %1 = tail call i1 @geti1()
  %2 = zext i1 %1 to i32
  br label %exit2

exit2:                                            ; preds = %while.end.i.thread, %entry
  %cmp.i12.i4 = phi i32 [ %2, %while.end.i.thread ], [ 0, %entry ]
  %cmp = tail call i1 @geti1()
  br i1 %cmp, label %if.then6, label %if.end.i.i

if.then6:                                         ; preds = %exit2
  %cmp.i32 = icmp ugt i32 %cmp.i12.i4, %conv.i
  br i1 %cmp.i32, label %exit, label %cond.false.i

cond.false.i:                                     ; preds = %if.then6
  %cmp.not6.i.i = tail call i1 @geti1()
  br i1 %cmp.not6.i.i, label %exit, label %for.body.preheader.i.i

for.body.preheader.i.i:                           ; preds = %cond.false.i
  %cmp.not.i.i = tail call i1 @geti1()
  br label %exit

exit:                                             ; preds = %for.body.preheader.i.i, %cond.false.i, %if.then6
  %retval.sroa.3.0.i = phi i32 [ 0, %if.then6 ], [ 1, %cond.false.i ], [ 1, %for.body.preheader.i.i ]
  br i1 %cmp19.i.not, label %if.end.i.i, label %do.body.i.i

do.body.i.i:                                      ; preds = %exit, %do.cond.i.i
  %result.sroa.7.0.i.i = phi i32 [ %result.sroa.7.1.i.i, %do.cond.i.i ], [ %retval.sroa.3.0.i, %exit ]
  switch i32 %result.sroa.7.0.i.i, label %do.cond.i.i [
    i32 2, label %sw.bb.i.i
    i32 1, label %if.end.i.i
    i32 0, label %if.end.i.i
  ]

sw.bb.i.i:                                        ; preds = %do.body.i.i
  %3 = tail call i32 @geti32()
  br label %do.cond.i.i

do.cond.i.i:                                      ; preds = %sw.bb.i.i, %do.body.i.i
  %result.sroa.7.1.i.i = phi i32 [ %result.sroa.7.0.i.i, %do.body.i.i ], [ %3, %sw.bb.i.i ]
  %cmp22.i.i = tail call i1 @geti1()
  br i1 %cmp22.i.i, label %do.body.i.i, label %if.end.i.i, !llvm.loop !5

if.end.i.i:                                       ; preds = %do.cond.i.i, %do.body.i.i, %do.body.i.i, %exit, %exit2
  ret void
}

declare i8 @geti8() local_unnamed_addr

declare i32 @geti32() local_unnamed_addr

declare i1 @geti1() local_unnamed_addr

!llvm.module.flags = !{!0, !1, !2, !3, !4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{i32 7, !"frame-pointer", i32 2}
!5 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}

%result.sroa.7.0.i.i was marked as overdefined because we reached the max widen steps.

I will post a patch later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants