Skip to content

Commit 3571b0a

Browse files
shiltiansearlmc1
authored andcommitted
[AMDGPU][ISel] Add more trunc store actions regarding bf16 (llvm#90493)
Change-Id: Iafcee86aa45b175d1c65fb81d7d788efa3bb0c92
1 parent 77da2f7 commit 3571b0a

File tree

4 files changed

+293
-426
lines changed

4 files changed

+293
-426
lines changed

llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,7 @@ AMDGPUTargetLowering::AMDGPUTargetLowering(const TargetMachine &TM,
302302
setTruncStoreAction(MVT::f32, MVT::f16, Expand);
303303
setTruncStoreAction(MVT::v2f32, MVT::v2bf16, Expand);
304304
setTruncStoreAction(MVT::v2f32, MVT::v2f16, Expand);
305+
setTruncStoreAction(MVT::v3f32, MVT::v3bf16, Expand);
305306
setTruncStoreAction(MVT::v3f32, MVT::v3f16, Expand);
306307
setTruncStoreAction(MVT::v4f32, MVT::v4bf16, Expand);
307308
setTruncStoreAction(MVT::v4f32, MVT::v4f16, Expand);
@@ -317,22 +318,27 @@ AMDGPUTargetLowering::AMDGPUTargetLowering(const TargetMachine &TM,
317318
setTruncStoreAction(MVT::f64, MVT::f32, Expand);
318319

319320
setTruncStoreAction(MVT::v2f64, MVT::v2f32, Expand);
321+
setTruncStoreAction(MVT::v2f64, MVT::v2bf16, Expand);
320322
setTruncStoreAction(MVT::v2f64, MVT::v2f16, Expand);
321323

322324
setTruncStoreAction(MVT::v3i64, MVT::v3i32, Expand);
323325
setTruncStoreAction(MVT::v3i64, MVT::v3i16, Expand);
324326
setTruncStoreAction(MVT::v3f64, MVT::v3f32, Expand);
327+
setTruncStoreAction(MVT::v3f64, MVT::v3bf16, Expand);
325328
setTruncStoreAction(MVT::v3f64, MVT::v3f16, Expand);
326329

327330
setTruncStoreAction(MVT::v4i64, MVT::v4i32, Expand);
328331
setTruncStoreAction(MVT::v4i64, MVT::v4i16, Expand);
329332
setTruncStoreAction(MVT::v4f64, MVT::v4f32, Expand);
333+
setTruncStoreAction(MVT::v4f64, MVT::v4bf16, Expand);
330334
setTruncStoreAction(MVT::v4f64, MVT::v4f16, Expand);
331335

332336
setTruncStoreAction(MVT::v8f64, MVT::v8f32, Expand);
337+
setTruncStoreAction(MVT::v8f64, MVT::v8bf16, Expand);
333338
setTruncStoreAction(MVT::v8f64, MVT::v8f16, Expand);
334339

335340
setTruncStoreAction(MVT::v16f64, MVT::v16f32, Expand);
341+
setTruncStoreAction(MVT::v16f64, MVT::v16bf16, Expand);
336342
setTruncStoreAction(MVT::v16f64, MVT::v16f16, Expand);
337343
setTruncStoreAction(MVT::v16i64, MVT::v16i16, Expand);
338344
setTruncStoreAction(MVT::v16i64, MVT::v16i16, Expand);

0 commit comments

Comments
 (0)