[clang] [clang][CodeGen] fix UB in aarch64 bfloat16 scalar conversion (PR #89062)

2024-04-29 Thread via cfe-commits
https://github.com/ostannard closed https://github.com/llvm/llvm-project/pull/89062 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] fix UB in aarch64 bfloat16 scalar conversion (PR #89062)

2024-04-29 Thread via cfe-commits
nihui wrote: > LGTM, thanks. And please merge this fix for me, I have no commit access :) https://github.com/llvm/llvm-project/pull/89062 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[clang] [clang][CodeGen] fix UB in aarch64 bfloat16 scalar conversion (PR #89062)

2024-04-29 Thread via cfe-commits
https://github.com/ostannard approved this pull request. LGTM, thanks. https://github.com/llvm/llvm-project/pull/89062 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] fix UB in aarch64 bfloat16 scalar conversion (PR #89062)

2024-04-25 Thread via cfe-commits
nihui wrote: @ostannard hi, would you please review my fix :) https://github.com/llvm/llvm-project/pull/89062 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] fix UB in aarch64 bfloat16 scalar conversion (PR #89062)

2024-04-17 Thread via cfe-commits
https://github.com/nihui updated https://github.com/llvm/llvm-project/pull/89062 >From 5b5e8e02205d1308987af17faa72ec54bab1892c Mon Sep 17 00:00:00 2001 From: nihui Date: Wed, 17 Apr 2024 20:04:00 +0800 Subject: [PATCH 1/2] fix UB in bfloat16 scalar conversion --- clang/include/clang/Basic/arm

[clang] [clang][CodeGen] fix UB in aarch64 bfloat16 scalar conversion (PR #89062)

2024-04-17 Thread via cfe-commits
https://github.com/nihui updated https://github.com/llvm/llvm-project/pull/89062 >From 05461899522816d2569fdab73b9eeda525524cc8 Mon Sep 17 00:00:00 2001 From: nihui Date: Wed, 17 Apr 2024 20:04:00 +0800 Subject: [PATCH 1/2] fix UB in bfloat16 scalar conversion --- clang/include/clang/Basic/arm

[clang] [clang][CodeGen] fix UB in aarch64 bfloat16 scalar conversion (PR #89062)

2024-04-17 Thread via cfe-commits
https://github.com/nihui updated https://github.com/llvm/llvm-project/pull/89062 >From 05461899522816d2569fdab73b9eeda525524cc8 Mon Sep 17 00:00:00 2001 From: nihui Date: Wed, 17 Apr 2024 20:04:00 +0800 Subject: [PATCH] fix UB in bfloat16 scalar conversion --- clang/include/clang/Basic/arm_neo

[clang] [clang][CodeGen] fix UB in aarch64 bfloat16 scalar conversion (PR #89062)

2024-04-17 Thread via cfe-commits
https://github.com/nihui updated https://github.com/llvm/llvm-project/pull/89062 >From c9e664be047d980786aa50ac682be529971caedd Mon Sep 17 00:00:00 2001 From: nihui Date: Wed, 17 Apr 2024 20:04:00 +0800 Subject: [PATCH] fix UB in bfloat16 scalar conversion --- clang/include/clang/Basic/arm_neo

[clang] [clang][CodeGen] fix UB in aarch64 bfloat16 scalar conversion (PR #89062)

2024-04-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (nihui) Changes do not bitcast 16bit `bfloat16` to 32bit `int32_t` directly bitcast to `int16_t`, and then upcast to `int32_t` Fix ASAN runtime error when calling vcvtah_f32_bf16 `==21842==ERROR: AddressSanitizer: stack-buffer-overflo

[clang] [clang][CodeGen] fix UB in aarch64 bfloat16 scalar conversion (PR #89062)

2024-04-17 Thread via cfe-commits
https://github.com/nihui created https://github.com/llvm/llvm-project/pull/89062 do not bitcast 16bit `bfloat16` to 32bit `int32_t` directly bitcast to `int16_t`, and then upcast to `int32_t` Fix ASAN runtime error when calling vcvtah_f32_bf16 `==21842==ERROR: AddressSanitizer: stack-buffer-over