Replace InsertLane format with TernaryImm8
The InsertLane format has an ordering (`value().imm().value()`) and immediate name (`"lane"`) that make it awkward to use for other instructions. This changes the ordering (`value().value().imm()`) and uses the default name (`"imm"`) throughout the codebase.
This commit is contained in:
@@ -91,10 +91,10 @@ block0:
|
||||
v2 = sshr v1, v0
|
||||
; check: v3 = x86_pextr v1, 0
|
||||
; nextln: v4 = sshr v3, v0
|
||||
; nextln: v5 = x86_pinsr v1, 0, v4
|
||||
; nextln: v5 = x86_pinsr v1, v4, 0
|
||||
; nextln: v6 = x86_pextr v1, 1
|
||||
; nextln: v7 = sshr v6, v0
|
||||
; nextln: v2 = x86_pinsr v5, 1, v7
|
||||
; nextln: v2 = x86_pinsr v5, v7, 1
|
||||
return v2
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ block0:
|
||||
[-, %rax] v0 = bconst.b8 true
|
||||
[-, %rbx] v1 = bconst.b8 false
|
||||
[-, %xmm0] v2 = splat.b8x16 v0
|
||||
[-, %xmm0] v3 = x86_pinsr v2, 10, v1 ; bin: 66 0f 3a 20 c3 0a
|
||||
[-, %xmm0] v3 = x86_pinsr v2, v1, 10 ; bin: 66 0f 3a 20 c3 0a
|
||||
return
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ block0:
|
||||
[-, %rax] v0 = iconst.i16 4
|
||||
[-, %rbx] v1 = iconst.i16 5
|
||||
[-, %xmm1] v2 = splat.i16x8 v0
|
||||
[-, %xmm1] v3 = x86_pinsr v2, 4, v1 ; bin: 66 0f c4 cb 04
|
||||
[-, %xmm1] v3 = x86_pinsr v2, v1, 4 ; bin: 66 0f c4 cb 04
|
||||
return
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ block0:
|
||||
[-, %rax] v0 = iconst.i32 42
|
||||
[-, %rbx] v1 = iconst.i32 99
|
||||
[-, %xmm4] v2 = splat.i32x4 v0
|
||||
[-, %xmm4] v3 = x86_pinsr v2, 2, v1 ; bin: 66 0f 3a 22 e3 02
|
||||
[-, %xmm4] v3 = x86_pinsr v2, v1, 2 ; bin: 66 0f 3a 22 e3 02
|
||||
return
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ block0:
|
||||
[-, %rax] v0 = bconst.b64 true
|
||||
[-, %rbx] v1 = bconst.b64 false
|
||||
[-, %xmm2] v2 = splat.b64x2 v0
|
||||
[-, %xmm2] v3 = x86_pinsr v2, 1, v1 ; bin: 66 48 0f 3a 22 d3 01
|
||||
[-, %xmm2] v3 = x86_pinsr v2, v1, 1 ; bin: 66 48 0f 3a 22 d3 01
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ block0:
|
||||
; check: block0:
|
||||
; nextln: v0 = iconst.i64 42
|
||||
; nextln: v2 = scalar_to_vector.i64x2 v0
|
||||
; nextln: v1 = x86_pinsr v2, 1, v0
|
||||
; nextln: v1 = x86_pinsr v2, v0, 1
|
||||
; nextln: return v1
|
||||
|
||||
function %splat_b16() -> b16x8 {
|
||||
@@ -67,7 +67,7 @@ block0:
|
||||
; check: block0:
|
||||
; nextln: v0 = bconst.b16 true
|
||||
; nextln: v2 = scalar_to_vector.b16x8 v0
|
||||
; nextln: v3 = x86_pinsr v2, 1, v0
|
||||
; nextln: v3 = x86_pinsr v2, v0, 1
|
||||
; nextln: v4 = raw_bitcast.i32x4 v3
|
||||
; nextln: v5 = x86_pshufd v4, 0
|
||||
; nextln: v1 = raw_bitcast.b16x8 v5
|
||||
|
||||
@@ -62,7 +62,7 @@ block0:
|
||||
v1 = bconst.b8 true
|
||||
v2 = vconst.b8x16 [false false false false false false false false false false false false false
|
||||
false false false]
|
||||
v3 = insertlane v2, 10, v1
|
||||
v3 = insertlane v2, v1, 10
|
||||
v4 = extractlane v3, 10
|
||||
return v4
|
||||
}
|
||||
@@ -72,7 +72,7 @@ function %insertlane_f32() -> b1 {
|
||||
block0:
|
||||
v0 = f32const 0x42.42
|
||||
v1 = vconst.f32x4 0x00
|
||||
v2 = insertlane v1, 1, v0
|
||||
v2 = insertlane v1, v0, 1
|
||||
v3 = extractlane v2, 1
|
||||
v4 = fcmp eq v3, v0
|
||||
return v4
|
||||
@@ -83,7 +83,7 @@ function %insertlane_f64_lane1() -> b1 {
|
||||
block0:
|
||||
v0 = f64const 0x42.42
|
||||
v1 = vconst.f64x2 0x00
|
||||
v2 = insertlane v1, 1, v0
|
||||
v2 = insertlane v1, v0, 1
|
||||
v3 = extractlane v2, 1
|
||||
v4 = fcmp eq v3, v0
|
||||
return v4
|
||||
@@ -94,7 +94,7 @@ function %insertlane_f64_lane0() -> b1 {
|
||||
block0:
|
||||
v0 = f64const 0x42.42
|
||||
v1 = vconst.f64x2 0x00
|
||||
v2 = insertlane v1, 0, v0
|
||||
v2 = insertlane v1, v0, 0
|
||||
v3 = extractlane v2, 0
|
||||
v4 = fcmp eq v3, v0
|
||||
return v4
|
||||
@@ -135,7 +135,7 @@ block0:
|
||||
v1 = iconst.i32 99
|
||||
|
||||
v2 = splat.i32x4 v0
|
||||
v3 = insertlane v2, 2, v1
|
||||
v3 = insertlane v2, v1, 2
|
||||
|
||||
v4 = extractlane v3, 3
|
||||
v5 = icmp eq v4, v0
|
||||
@@ -154,7 +154,7 @@ block0:
|
||||
v1 = f32const 0x99.99
|
||||
|
||||
v2 = splat.f32x4 v0
|
||||
v3 = insertlane v2, 2, v1
|
||||
v3 = insertlane v2, v1, 2
|
||||
|
||||
v4 = extractlane v3, 3
|
||||
v5 = fcmp eq v4, v0
|
||||
|
||||
@@ -67,13 +67,13 @@ function %lanes() {
|
||||
block0:
|
||||
v0 = iconst.i32x4 2
|
||||
v1 = extractlane v0, 3
|
||||
v2 = insertlane v0, 1, v1
|
||||
v2 = insertlane v0, v1, 1
|
||||
}
|
||||
; sameln: function %lanes() fast {
|
||||
; nextln: block0:
|
||||
; nextln: v0 = iconst.i32x4 2
|
||||
; nextln: v1 = extractlane v0, 3
|
||||
; nextln: v2 = insertlane v0, 1, v1
|
||||
; nextln: v2 = insertlane v0, v1, 1
|
||||
; nextln: }
|
||||
|
||||
; Integer condition codes.
|
||||
|
||||
@@ -6,7 +6,7 @@ function %insertlane_i32x4() {
|
||||
block0:
|
||||
v0 = vconst.i32x4 [0 0 0 0]
|
||||
v1 = iconst.i32 42
|
||||
v2 = insertlane v0, 4, v1 ; error: The lane 4 does not index into the type i32x4
|
||||
v2 = insertlane v0, v1, 4 ; error: The lane 4 does not index into the type i32x4
|
||||
return
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ function %insertlane_b16x8() {
|
||||
block0:
|
||||
v0 = vconst.b16x8 [false false false false false false false false]
|
||||
v1 = bconst.b16 true
|
||||
v2 = insertlane v0, 8, v1 ; error: The lane 8 does not index into the type b16x8
|
||||
v2 = insertlane v0, v1, 8 ; error: The lane 8 does not index into the type b16x8
|
||||
return
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ function %insertlane_f64x2() {
|
||||
block0:
|
||||
v0 = vconst.f64x2 0x00
|
||||
v1 = f64const 0x0.1
|
||||
v2 = insertlane v0, 2, v1 ; error: The lane 2 does not index into the type f64x2
|
||||
v2 = insertlane v0, v1, 2 ; error: The lane 2 does not index into the type f64x2
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user