getActionDefinitionsBuilder({G_SITOFP, G_UITOFP})
.legalForCartesianProduct({s32, s64, v2s64, v4s32, v2s32})
.clampScalar(1, s32, s64)
- .widenScalarToNextPow2(1)
+ .minScalarSameAs(1, 0)
.clampScalar(0, s32, s64)
.widenScalarToNextPow2(0);
define void @test_sitofp_v4s32() { ret void }
define void @test_uitofp_v4s32() { ret void }
+ define void @test_uitofp_v2s64_v2i1() { ret void }
+ define void @test_sitofp_v2s64_v2i1() { ret void }
+
define void @test_sitofp_s32_s16() { ret void }
define void @test_uitofp_s32_s16() { ret void }
...
...
---
+name: test_uitofp_v2s64_v2i1
+body: |
+ bb.0:
+ liveins: $q0
+ ; CHECK-LABEL: name: test_uitofp_v2s64_v2i1
+ ; CHECK: [[DEF:%[0-9]+]]:_(s1) = G_IMPLICIT_DEF
+ ; CHECK: [[COPY:%[0-9]+]]:_(s1) = COPY [[DEF]](s1)
+ ; CHECK: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s1>) = G_BUILD_VECTOR [[DEF]](s1), [[COPY]](s1)
+ ; CHECK: [[ZEXT:%[0-9]+]]:_(<2 x s64>) = G_ZEXT [[BUILD_VECTOR]](<2 x s1>)
+ ; CHECK: [[UITOFP:%[0-9]+]]:_(<2 x s64>) = G_UITOFP [[ZEXT]](<2 x s64>)
+ ; CHECK: $q0 = COPY [[UITOFP]](<2 x s64>)
+ %0:_(<2 x s1>) = G_IMPLICIT_DEF
+ %1:_(<2 x s64>) = G_UITOFP %0
+ $q0 = COPY %1
+...
+
+---
+name: test_sitofp_v2s64_v2i1
+body: |
+ bb.0:
+ liveins: $q0
+ ; CHECK-LABEL: name: test_sitofp_v2s64_v2i1
+ ; CHECK: [[DEF:%[0-9]+]]:_(s1) = G_IMPLICIT_DEF
+ ; CHECK: [[COPY:%[0-9]+]]:_(s1) = COPY [[DEF]](s1)
+ ; CHECK: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s1>) = G_BUILD_VECTOR [[DEF]](s1), [[COPY]](s1)
+ ; CHECK: [[SEXT:%[0-9]+]]:_(<2 x s64>) = G_SEXT [[BUILD_VECTOR]](<2 x s1>)
+ ; CHECK: [[SITOFP:%[0-9]+]]:_(<2 x s64>) = G_SITOFP [[SEXT]](<2 x s64>)
+ ; CHECK: $q0 = COPY [[SITOFP]](<2 x s64>)
+ %0:_(<2 x s1>) = G_IMPLICIT_DEF
+ %1:_(<2 x s64>) = G_SITOFP %0
+ $q0 = COPY %1
+...
+
+---
name: test_sitofp_s32_s16
body: |
bb.0:
# DEBUG-NEXT: .. the first uncovered type index: 2, OK
# DEBUG-NEXT: .. the first uncovered imm index: 0, OK
# DEBUG-NEXT: G_SITOFP (opcode {{[0-9]+}}): 2 type indices, 0 imm indices
-# DEBUG-NEXT: .. the first uncovered type index: 2, OK
-# DEBUG-NEXT: .. the first uncovered imm index: 0, OK
+# DEBUG-NEXT: .. type index coverage check SKIPPED: user-defined predicate detected
+# DEBUG-NEXT: .. imm index coverage check SKIPPED: user-defined predicate detected
# DEBUG-NEXT: G_UITOFP (opcode {{[0-9]+}}): 2 type indices, 0 imm indices
# DEBUG-NEXT: .. opcode {{[0-9]+}} is aliased to {{[0-9]+}}
-# DEBUG-NEXT: .. the first uncovered type index: 2, OK
-# DEBUG-NEXT: .. the first uncovered imm index: 0, OK
+# DEBUG-NEXT: .. type index coverage check SKIPPED: user-defined predicate detected
+# DEBUG-NEXT: .. imm index coverage check SKIPPED: user-defined predicate detected
# DEBUG-NEXT: G_FABS (opcode {{[0-9]+}}): 1 type index, 0 imm indices
# DEBUG-NEXT: .. opcode {{[0-9]+}} is aliased to {{[0-9]+}}
# DEBUG-NEXT: .. type index coverage check SKIPPED: user-defined predicate detected