[all-commits] [llvm/llvm-project] c736a3: [HLSL] Fix crash when comparing two half vectors (...
Kaitlin Peng via All-commits
all-commits at lists.llvm.org
Thu Aug 6 15:12:57 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c736a3eb6cfa6bbbbac7f17b7afe0df88eddaec9
https://github.com/llvm/llvm-project/commit/c736a3eb6cfa6bbbbac7f17b7afe0df88eddaec9
Author: Kaitlin Peng <kaitlinpeng at microsoft.com>
Date: 2026-08-06 (Thu, 06 Aug 2026)
Changed paths:
M clang/lib/Sema/SemaExpr.cpp
A clang/test/CodeGenHLSL/Operators/half-vector-comparisons.hlsl
A clang/test/SemaHLSL/Operators/half-vector-comparisons.hlsl
Log Message:
-----------
[HLSL] Fix crash when comparing two half vectors (#214332)
Fixes #213814.
Comparing two half vectors in default mode crashed Clang with a
`convertHalfVecBinOp` assertion because the function expects the result
to be a half/short vector while HLSL returns an int vector. This PR
fixes the bug by skipping the conversion function when the result type
is not a half or short vector. This lets it fall through to the default
`BinaryOperator::Create` path, which builds the comparison correctly
with the int vector result type. The PR also adds regression tests
covering the six comparison operators.
Assisted-by: Claude Opus 4.8
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list