Skip to content

Commit c2a892f

Browse files
committed
Revert "[clang][bytecode] Implement bitcasts to floating-point values (#114485)"
This reverts commit c752efb. This broke bots: - https://lab.llvm.org/buildbot/#/builders/13/builds/3268 - https://lab.llvm.org/buildbot/#/builders/42/builds/1718
1 parent 0812cde commit c2a892f

File tree

3 files changed

+2
-92
lines changed

3 files changed

+2
-92
lines changed

clang/lib/AST/ByteCode/Interp.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3062,8 +3062,7 @@ inline bool BitCast(InterpState &S, CodePtr OpPC, bool TargetIsUCharOrByte,
30623062
return false;
30633063

30643064
if constexpr (std::is_same_v<T, Floating>) {
3065-
assert(Sem);
3066-
S.Stk.push<Floating>(T::bitcastFromMemory(Buff.data(), *Sem));
3065+
assert(false && "Implement bitcasting to a floating type");
30673066
} else {
30683067
assert(!Sem);
30693068
S.Stk.push<T>(T::bitcastFromMemory(Buff.data(), ResultBitWidth));

clang/test/AST/ByteCode/builtin-bit-cast-long-double.cpp

Lines changed: 0 additions & 87 deletions
This file was deleted.

clang/test/AST/ByteCode/builtin-bit-cast.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,6 @@ static_assert(check_round_trip<__int128_t>((__int128_t)34));
7676
static_assert(check_round_trip<__int128_t>((__int128_t)-34));
7777
#endif
7878

79-
static_assert(check_round_trip<double>(17.0));
80-
8179

8280
namespace simple {
8381
constexpr int A = __builtin_bit_cast(int, 10);
@@ -110,7 +108,7 @@ namespace simple {
110108
static_assert(check_round_trip<unsigned>((int)0x12345678));
111109
static_assert(check_round_trip<unsigned>((int)0x87654321));
112110
static_assert(check_round_trip<unsigned>((int)0x0C05FEFE));
113-
static_assert(round_trip<float>((int)0x0C05FEFE));
111+
// static_assert(round_trip<float>((int)0x0C05FEFE));
114112

115113

116114
/// This works in GCC and in the bytecode interpreter, but the current interpreter

0 commit comments

Comments
 (0)