llvm-project
ef72a0e4 - [InstSimplify] Simplify vector `bitinsert` and `bitextract` with out-of-range offsets (#242816)

Commit
1 day ago
[InstSimplify] Simplify vector `bitinsert` and `bitextract` with out-of-range offsets (#242816) Simplify vector `bitinsert` and `bitextract` to `poison` when every element of a constant offset is out of range or `poison`. #229125 added this fold for scalar and splat offsets. This extends it to non-splat vector offsets. ```llvm %a = bitextract <4 x i8>, <4 x b32> %x, <4 x i32> <i32 25, i32 32, i32 poison, i32 -1> ; poison %b = bitextract <4 x i8>, <4 x b32> %x, <4 x i32> <i32 0, i32 8, i32 16, i32 25> ; unchanged, only the last element is out of range ```
Author
Parents
Loading