Skip to content

Commit 5b5e8e0

Browse files
committed
fix UB in bfloat16 scalar conversion
1 parent 3fbb815 commit 5b5e8e0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/include/clang/Basic/arm_neon.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ def OP_VCVT_BF16_F32_HI_A32
275275
(call "vget_low", $p0))>;
276276

277277
def OP_CVT_F32_BF16
278-
: Op<(bitcast "R", (op "<<", (bitcast "int32_t", $p0),
278+
: Op<(bitcast "R", (op "<<", (cast "int32_t", (bitcast "int16_t", $p0)),
279279
(literal "int32_t", "16")))>;
280280

281281
//===----------------------------------------------------------------------===//

0 commit comments

Comments
 (0)