Skip to content

Commit

Permalink
[fixiup] Add a test using compound assignment operator
Browse files Browse the repository at this point in the history
Change-Id: I81e1fd4f23eb65a96e71015de7a4562fcbc53c0f
  • Loading branch information
momchil-velikov committed May 21, 2024
1 parent b1b69ff commit 08a155b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions clang/test/CodeGen/aarch64-sve-vector-subscript-ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,15 @@ svfloat32_t subscript_write_float32(svfloat32_t a, size_t b) {
a[b] = 1.0f;
return a;
}

// CHECK-LABEL: @subscript_read_write_float32(
// CHECK-NEXT: entry:
// CHECK-NEXT: [[VECEXT:%.*]] = extractelement <vscale x 4 x float> [[A:%.*]], i64 [[B:%.*]]
// CHECK-NEXT: [[ADD:%.*]] = fadd float [[VECEXT]], 1.000000e+00
// CHECK-NEXT: [[VECINS:%.*]] = insertelement <vscale x 4 x float> [[A]], float [[ADD]], i64 [[B]]
// CHECK-NEXT: ret <vscale x 4 x float> [[VECINS]]
//
svfloat32_t subscript_read_write_float32(svfloat32_t a, size_t b) {
a[b] += 1.0f;
return a;
}

0 comments on commit 08a155b

Please sign in to comment.