[llvm] [clang] split load to bytes to deduce load value (PR #72364)

2023-11-15 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,166 @@ +; RUN: opt -S -O3 < %s nikic wrote: GVN tests should use `-passes=gvn` only, not `-O3`. https://github.com/llvm/llvm-project/pull/72364 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/

[llvm] [clang] split load to bytes to deduce load value (PR #72364)

2023-11-15 Thread Nikita Popov via cfe-commits
@@ -2128,6 +2129,105 @@ static void patchAndReplaceAllUsesWith(Instruction *I, Value *Repl) { I->replaceAllUsesWith(Repl); } +// split load to single byte loads and check if the value can be deduced +// +// Example: +// define i32 @f(i8* %P) +// 1: %b2 = getelementptr inbo

[llvm] [clang] split load to bytes to deduce load value (PR #72364)

2023-11-15 Thread Nikita Popov via cfe-commits
@@ -2128,6 +2129,105 @@ static void patchAndReplaceAllUsesWith(Instruction *I, Value *Repl) { I->replaceAllUsesWith(Repl); } +// split load to single byte loads and check if the value can be deduced +// +// Example: +// define i32 @f(i8* %P) +// 1: %b2 = getelementptr inbo

[llvm] [clang] split load to bytes to deduce load value (PR #72364)

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

[llvm] [clang] split load to bytes to deduce load value (PR #72364)

2023-11-15 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff dedf2c6bb5193652f6ad7d9ff9e676624c2485b7 41a9dbd39fbb866e7fc090f82d58ee6364a7cfda --

[llvm] [clang] split load to bytes to deduce load value (PR #72364)

2023-11-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (mohammed-nurulhoque) Changes When the last clobbering write for a load doesn't cover the whole load (example below). AnalyzeLoadAvailability would give up. This emits temporary byte-sized loads that cover the original load, then ru

[llvm] [clang] split load to bytes to deduce load value (PR #72364)

2023-11-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-analysis Author: None (mohammed-nurulhoque) Changes When the last clobbering write for a load doesn't cover the whole load (example below). AnalyzeLoadAvailability would give up. This emits temporary byte-sized loads that cover the original load,

[llvm] [clang] split load to bytes to deduce load value (PR #72364)

2023-11-15 Thread via cfe-commits
https://github.com/mohammed-nurulhoque created https://github.com/llvm/llvm-project/pull/72364 When the last clobbering write for a load doesn't cover the whole load (example below). AnalyzeLoadAvailability would give up. This emits temporary byte-sized loads that cover the original load, the