[clang] [llvm] [InstCombine] Infer zext nneg flag (PR #71534)

2023-11-09 Thread Nikita Popov via cfe-commits
nikic wrote: Should be fixed by https://github.com/llvm/llvm-project/commit/1b1c81772fe50a1cb2b2adf8d8cf442c0b73602f. https://github.com/llvm/llvm-project/pull/71534 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] [InstCombine] Infer zext nneg flag (PR #71534)

2023-11-09 Thread via cfe-commits
dyung wrote: We also have a couple of internal tests that seem to be failing after this commit. Consider the following code: ```c++ char print_tmp[1]; void print(char *, void *data, unsigned size) { unsigned char *bytes = (unsigned char *)data; for (unsigned i = 0; i != size; ++i)

[clang] [llvm] [InstCombine] Infer zext nneg flag (PR #71534)

2023-11-07 Thread via cfe-commits
https://github.com/goldsteinn approved this pull request. https://github.com/llvm/llvm-project/pull/71534 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [InstCombine] Infer zext nneg flag (PR #71534)

2023-11-07 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw approved this pull request. LGTM. Thanks! We can improve the compile time by adding `nneg` flag during the zext creation (e.g., `cttz(zext(x)) -> zext nneg(cttz(x))`). https://github.com/llvm/llvm-project/pull/71534 ___

[clang] [llvm] [InstCombine] Infer zext nneg flag (PR #71534)

2023-11-07 Thread Nikita Popov via cfe-commits
https://github.com/nikic updated https://github.com/llvm/llvm-project/pull/71534 >From e965141dc8e0be4dceb3e302ea91761203015c72 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 6 Nov 2023 17:28:11 +0100 Subject: [PATCH] [InstCombine] Infer zext nneg flag Use KnownBits to infer the nneg