Skip to content

Commit be3eeea

Browse files
committed
[AArch64] Use SHLLv4i16 to shift+widen BF16 to F32.
1 parent 93e423f commit be3eeea

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/lib/Target/AArch64/AArch64InstrInfo.td

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7730,8 +7730,7 @@ def : Pat<(v2i64 (sext (v2i32 V64:$Rn))), (SSHLLv2i32_shift V64:$Rn, (i32 0))>
77307730
def : Pat<(v2i64 (zext (v2i32 V64:$Rn))), (USHLLv2i32_shift V64:$Rn, (i32 0))>;
77317731
def : Pat<(v2i64 (anyext (v2i32 V64:$Rn))), (USHLLv2i32_shift V64:$Rn, (i32 0))>;
77327732
// Vector bf16 -> fp32 is implemented morally as a zext + shift.
7733-
def : Pat<(v4f32 (any_fpextend (v4bf16 V64:$Rn))),
7734-
(USHLLv4i16_shift V64:$Rn, (i32 16))>;
7733+
def : Pat<(v4f32 (any_fpextend (v4bf16 V64:$Rn))), (SHLLv4i16 V64:$Rn)>;
77357734
// Also match an extend from the upper half of a 128 bit source register.
77367735
def : Pat<(v8i16 (anyext (v8i8 (extract_high_v16i8 (v16i8 V128:$Rn)) ))),
77377736
(USHLLv16i8_shift V128:$Rn, (i32 0))>;

0 commit comments

Comments
 (0)