Skip to content
Commit 0f9ef8b1 authored by Mingming Liu's avatar Mingming Liu
Browse files

[AArch64] Select BFI/BFXIL to ORR with shifted operand when one operand is the...

[AArch64] Select BFI/BFXIL to ORR with shifted operand when one operand is the left or right shift of another operand

Use right shift [1] as an example
- Before, bfxil is generated (https://godbolt.org/z/EfzWMszPn)
- After, orr with right-shifted operand is generated (added test cases in `CodeGen/AArch64/bitfield-insert.ll`)

[1]
```
define i64 @test_orr_not_bfxil_i64(i64 %0) {
  %2 = and i64 %0, 1044480 ; 0xff000
  %3 = lshr i64 %2, 12
  %4 = or i64 %2, %3
  ret i64 %4
}
```

Differential Revision: https://reviews.llvm.org/D137689
parent 3acbaddd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment