[llvm] [InstCombine] Don't require GEP in indexed compare fold (PR #81614)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 27 10:33:17 PST 2024


dtcxzyw wrote:

Looks like this patch causes a regression in `MultiSource/Benchmarks/MallocBench/gs/gs`:
```
Files ./artifacts/binaries/20afdc8b9654096d07aef3ab03f9d8ef_bc/seg10.ll and ./artifacts/binaries/a1eef7aa3a36cc347f282448e99dbcd3_bc/seg10.ll differ
in function scan_token:
  in block %523 / %551:
    >   %553 = add nsw i64 %552, -1
    >   %554 = and i64 %533, 7
    >   %555 = icmp eq i64 %554, 0
    >   br i1 %555, label %597, label %556
    <   %525 = getelementptr inbounds i8, ptr %348, i64 %524
    <   br label %526
  in block %592 / %648:
    >   %649 = phi ptr [ %376, %530 ], [ %376, %539 ], [ %639, %638 ], [ %376, %640 ]
    <   %593 = phi ptr [ %348, %502 ], [ %348, %511 ], [ %583, %582 ], [ %348, %584 ]
  in block %263 / %263:
    >   %265 = add nsw i64 %264, -1
    >   %266 = and i64 %245, 7
    >   %267 = icmp eq i64 %266, 0
    >   br i1 %267, label %309, label %268
    <   %265 = getelementptr inbounds i8, ptr %241, i64 %264
    <   br label %266
```

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


More information about the llvm-commits mailing list