Skip to content

Commit 6906edb

Browse files
chore: autopublish 2026-04-09T23:57:39Z
1 parent 41ae95c commit 6906edb

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

tools/clang/unittests/HLSLExec/LinAlgTests.cpp

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -246,11 +246,14 @@ static VariantCompType makeExpected(ComponentType CompType, int32_t M,
246246
Floats[Idx] = StartingVal + static_cast<float>(Increment ? Value : 0);
247247
break;
248248
case ComponentType::I32:
249-
VERIFY_IS_TRUE(StartingVal < static_cast<float>(std::numeric_limits<int32_t>::max()),
250-
"Value too large to cast to int32_t");
251-
VERIFY_IS_TRUE(StartingVal > static_cast<float>(std::numeric_limits<int32_t>::min()),
252-
"Value too small to cast to int32_t");
253-
Ints[Idx] = static_cast<int32_t>(StartingVal) + static_cast<int32_t>(Increment ? Value : 0);
249+
VERIFY_IS_TRUE(StartingVal < static_cast<float>(
250+
std::numeric_limits<int32_t>::max()),
251+
"Value too large to cast to int32_t");
252+
VERIFY_IS_TRUE(StartingVal > static_cast<float>(
253+
std::numeric_limits<int32_t>::min()),
254+
"Value too small to cast to int32_t");
255+
Ints[Idx] = static_cast<int32_t>(StartingVal) +
256+
static_cast<int32_t>(Increment ? Value : 0);
254257
break;
255258
case ComponentType::F16: {
256259
// Downcasting is safe here since HLSLHalf_t will clamp if F is too

0 commit comments

Comments
 (0)