[PATCH] D130565: [Aarch64] Add cost for missing extensions.

dewen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 27 18:36:56 PDT 2022


dewen added a comment.

for example:

  define <4 x double> @test_unsigned_v4i32_to_v4f64(<4 x i32> %v) nounwind readnone {
    %conv = uitofp <4 x i32> %v to <4 x double>
    ret <4 x double> %conv
  }
  
  define <4 x double> @test_signed_v4i32_to_v4f64(<4 x i32> %v) nounwind readnone {
    %conv = sitofp <4 x i32> %v to <4 x double>
    ret <4 x double> %conv
  }

`to`

  .text
          .file   "585_1.ll"
          .globl  test_unsigned_v4i32_to_v4f64    // -- Begin function test_unsigned_v4i32_to_v4f64
          .p2align        2
          .type   test_unsigned_v4i32_to_v4f64, at function
  test_unsigned_v4i32_to_v4f64:           // @test_unsigned_v4i32_to_v4f64
  // %bb.0:
          ushll2.2d       v1, v0, #0
          ushll.2d        v0, v0, #0
          ucvtf.2d        v1, v1
          ucvtf.2d        v0, v0
          ret
  .Lfunc_end0:
          .size   test_unsigned_v4i32_to_v4f64, .Lfunc_end0-test_unsigned_v4i32_to_v4f64
                                          // -- End function
          .globl  test_signed_v4i32_to_v4f64      // -- Begin function test_signed_v4i32_to_v4f64
          .p2align        2
          .type   test_signed_v4i32_to_v4f64, at function
  test_signed_v4i32_to_v4f64:             // @test_signed_v4i32_to_v4f64
  // %bb.0:
          sshll2.2d       v1, v0, #0
          sshll.2d        v0, v0, #0
          scvtf.2d        v1, v1
          scvtf.2d        v0, v0
          ret
  .Lfunc_end1:
          .size   test_signed_v4i32_to_v4f64, .Lfunc_end1-test_signed_v4i32_to_v4f64
                                          // -- End function
          .section        ".note.GNU-stack","", at progbits


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130565/new/

https://reviews.llvm.org/D130565



More information about the llvm-commits mailing list