[llvm] Reland "Redesign Straight-Line Strength Reduction (SLSR) (#162930)" (PR #169614)
Artem Belevich via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 26 13:05:32 PST 2025
================
@@ -8,7 +8,7 @@ target datalayout = "e-i64:64-v16:16-v32:32-n16:32:64"
define void @path_compression(i32 %a, ptr %base, i16 %r, i1 %cond) {
; CHECK-LABEL: @path_compression(
; CHECK: [[I:%.*]] = sext i32 %a to i64
-; CHECK: [[GEP1:%.*]] = getelementptr inbounds %struct.A, ptr %base, i64 [[I]]
+; CHECK: [[GEP1:%.*]] = getelementptr %struct.A, ptr %base, i64 [[I]]
----------------
Artem-B wrote:
We don't seem to change anything else in that GEP instruction. Did we really rewrite it?
Original IR appears to be unchanged modulo the `inbounds`:
```
%1 = sext i32 %a to i64
%getElem1 = getelementptr inbounds %struct.A, ptr %base, i64 %1
```
Is it possible that we're rewriting only some of the instructions in `DropPoisonGeneratingInsts`? If that's the case, should the attributes be dropped only on the actually rewritten isntructions?
https://github.com/llvm/llvm-project/pull/169614
More information about the llvm-commits
mailing list