Issue |
126056
|
Summary |
[InstCombine] Failure to recognise a split i128 extension
|
Labels |
llvm:instcombine,
missed-optimization
|
Assignees |
|
Reporter |
RKSimon
|
Split off from #76524
https://alive2.llvm.org/ce/z/4SwMjF
```ll
----------------------------------------
define i128 @src(i32 noundef %x) {
%coerce.sroa.0.0.extract.trunc = sext i32 noundef %x to i64
%ashr = ashr i32 noundef %x, 31
%coerce.sroa.2.0.extract.trunc = sext i32 %ashr to i64
%x.sroa.2.0.insert.ext.i = zext i64 %coerce.sroa.2.0.extract.trunc to i128
%x.sroa.2.0.insert.shift.i = shl nuw i128 %x.sroa.2.0.insert.ext.i, 64
%x.sroa.0.0.insert.ext.i = zext i64 %coerce.sroa.0.0.extract.trunc to i128
%x.sroa.0.0.insert.insert.i = or disjoint i128 %x.sroa.2.0.insert.shift.i, %x.sroa.0.0.insert.ext.i
ret i128 %x.sroa.0.0.insert.insert.i
}
=>
define i128 @tgt(i32 noundef %x) {
%xx = sext i32 noundef %x to i128
ret i128 %xx
}
Transformation seems to be correct!
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs