[llvm] [LV] Peek through bitcasts when performing CSE (PR #146856)

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 3 03:11:25 PDT 2025


================
@@ -0,0 +1,77 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals none --filter-out-after "^scalar.ph" --version 5
+; RUN: opt %s -passes=loop-vectorize -S | FileCheck %s
+
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-unknown-linux-gnu"
+
+define i32 @bitcast-cse(i16 %val, half %fval, ptr %p, i64 %n) {
----------------
artagnon wrote:

```suggestion
define i32 @bitcast_cse(i16 %val, half %fval, ptr %p, i64 %n) {
```

Can you rebase to include the test as the first commit (in the style of a pre-commit test), and the functional change on top, so we can see the diff?

Also, can you locally modify canHandle for the cases you haven't changed, to check that they're covered by existing tests?

https://github.com/llvm/llvm-project/pull/146856


More information about the llvm-commits mailing list