|
| 1 | +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5 |
| 2 | +; RUN: opt -S -passes='dxil-data-scalarization,dxil-flatten-arrays,function(scalarizer<load-store>),dxil-op-lower' -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s |
| 3 | + |
| 4 | + |
| 5 | +@_ZL7Palette = internal constant [8 x <3 x float>] [<3 x float> zeroinitializer, <3 x float> splat (float 5.000000e-01), <3 x float> <float 1.000000e+00, float 5.000000e-01, float 5.000000e-01>, <3 x float> <float 5.000000e-01, float 1.000000e+00, float 5.000000e-01>, <3 x float> <float 5.000000e-01, float 5.000000e-01, float 1.000000e+00>, <3 x float> <float 5.000000e-01, float 1.000000e+00, float 1.000000e+00>, <3 x float> <float 1.000000e+00, float 5.000000e-01, float 1.000000e+00>, <3 x float> <float 1.000000e+00, float 1.000000e+00, float 5.000000e-01>], align 16 |
| 6 | + |
| 7 | +; Function Attrs: alwaysinline convergent mustprogress norecurse nounwind |
| 8 | +define internal void @_Z4mainDv3_j(<3 x i32> noundef %DID) #1 { |
| 9 | +; CHECK-LABEL: define internal void @_Z4mainDv3_j( |
| 10 | +; CHECK-SAME: <3 x i32> noundef [[DID:%.*]]) { |
| 11 | +; CHECK-NEXT: [[ENTRY:.*:]] |
| 12 | +; CHECK-NEXT: [[TMP0:%.*]] = getelementptr [24 x float], ptr @_ZL7Palette.scalarized.1dim, i32 1 |
| 13 | +; CHECK-NEXT: [[DOTI0:%.*]] = load float, ptr [[TMP0]], align 16 |
| 14 | +; CHECK-NEXT: [[DOTI1:%.*]] = getelementptr float, ptr [[TMP0]], i32 1 |
| 15 | +; CHECK-NEXT: [[DOTI11:%.*]] = load float, ptr [[DOTI1]], align 4 |
| 16 | +; CHECK-NEXT: [[DOTI2:%.*]] = getelementptr float, ptr [[TMP0]], i32 2 |
| 17 | +; CHECK-NEXT: [[DOTI22:%.*]] = load float, ptr [[DOTI2]], align 8 |
| 18 | +; CHECK-NEXT: [[TMP1:%.*]] = getelementptr [24 x float], ptr @_ZL7Palette.scalarized.1dim, i32 2 |
| 19 | +; CHECK-NEXT: [[DOTI03:%.*]] = load float, ptr [[TMP1]], align 16 |
| 20 | +; CHECK-NEXT: [[DOTI14:%.*]] = getelementptr float, ptr [[TMP1]], i32 1 |
| 21 | +; CHECK-NEXT: [[DOTI15:%.*]] = load float, ptr [[DOTI14]], align 4 |
| 22 | +; CHECK-NEXT: [[DOTI26:%.*]] = getelementptr float, ptr [[TMP1]], i32 2 |
| 23 | +; CHECK-NEXT: [[DOTI27:%.*]] = load float, ptr [[DOTI26]], align 8 |
| 24 | +; CHECK-NEXT: ret void |
| 25 | +; |
| 26 | +entry: |
| 27 | + %arrayidx = getelementptr inbounds [8 x <3 x float>], ptr @_ZL7Palette, i32 0, i32 1 |
| 28 | + %2 = load <3 x float>, ptr %arrayidx, align 16 |
| 29 | + %arrayidx2 = getelementptr inbounds [8 x <3 x float>], ptr @_ZL7Palette, i32 0, i32 2 |
| 30 | + %3 = load <3 x float>, ptr %arrayidx2, align 16 |
| 31 | + ret void |
| 32 | +} |
0 commit comments