Issue 181495
Summary [ARM] arm does not recognize manual sri
Labels new issue
Assignees
Reporter folkertdev
    given

https://godbolt.org/z/qGeMc4K1W (derived from https://godbolt.org/z/9cf3ooM1o)

```llvm
define <2 x i32> @helper(<2 x i32> %a, <2 x i32> %b) unnamed_addr {
bb1:
  %0 = and <2 x i32> %a, splat (i32 -536870912)
  %1 = lshr <2 x i32> %b, splat (i32 3)
 %2 = or disjoint <2 x i32> %1, %0
  ret <2 x i32> %2
}
```

aarch64 optimizes this nicely into 

```asm
helper:
        sri     v0.2s, v1.2s, #3
        ret
```

but on arm we get the much longer

```asm
helper:
        vmov.i32        d16, #0xe0000000
 vshr.u32        d17, d1, #3
        vand    d16, d0, d16
        vorr d0, d17, d16
        bx      lr
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to