[flang] [llvm] [clang] [InstCombine] Canonicalize constant GEPs to i8 source element type (PR #68882)

2023-12-21 Thread Yingwei Zheng via cfe-commits
dtcxzyw wrote: An unique regression: ``` diff --git a/bench/openssl/optimized/hexstr_test-bin-hexstr_test.ll b/bench/openssl/optimized/hexstr_test-bin-hexstr_test.ll index 534c0a07..85a097fc 100644 --- a/bench/openssl/optimized/hexstr_test-bin-hexstr_test.ll +++ b/bench/openssl/optimized/hexstr_

[flang] [llvm] [clang] [InstCombine] Canonicalize constant GEPs to i8 source element type (PR #68882)

2023-12-21 Thread Yingwei Zheng via cfe-commits
dtcxzyw wrote: > @dtcxzyw GitHub can't display the diff, and struggles to clone the repo. Can > you share the diffs for just the mentioned files? I have posted the diff between optimized IRs. https://github.com/llvm/llvm-project/pull/68882 ___ cfe-c

[flang] [llvm] [clang] [InstCombine] Canonicalize constant GEPs to i8 source element type (PR #68882)

2023-12-21 Thread Yingwei Zheng via cfe-commits
dtcxzyw wrote: @nikic Could you please have a look at https://github.com/dtcxzyw/llvm-opt-benchmark/pull/17? One regression: ``` diff --git a/bench/brotli/optimized/compound_dictionary.c.ll b/bench/brotli/optimized/compound_dictionary.c.ll index 21fd37fd..b9894810 100644 --- a/bench/brotli/opti

[llvm] [clang] [InstCombine] Canonicalize constant GEPs to i8 source element type (PR #68882)

2023-12-20 Thread Nikita Popov via cfe-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/68882 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [InstCombine] Canonicalize constant GEPs to i8 source element type (PR #68882)

2023-12-20 Thread Nikita Popov via cfe-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/68882 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [InstCombine] Canonicalize constant GEPs to i8 source element type (PR #68882)

2023-11-28 Thread Nikita Popov via cfe-commits
@@ -2282,6 +2282,15 @@ Instruction *InstCombinerImpl::visitGetElementPtrInst(GetElementPtrInst &GEP) { if (MadeChange) return &GEP; + // Canonicalize constant GEPs to i8 type. nikic wrote: GEP operates in terms of bytes, not bits. The size of i8 is re

[llvm] [clang] [InstCombine] Canonicalize constant GEPs to i8 source element type (PR #68882)

2023-11-28 Thread Björn Pettersson via cfe-commits
@@ -2282,6 +2282,15 @@ Instruction *InstCombinerImpl::visitGetElementPtrInst(GetElementPtrInst &GEP) { if (MadeChange) return &GEP; + // Canonicalize constant GEPs to i8 type. bjope wrote: FWIW, this is a bit interesting downstream with non-8-bit addr