appujee
appujee
it was cherry-picked to our llvm in https://android-review.googlesource.com/c/toolchain/llvm_android/+/3009313 it is not in the toolchain (clang-r522817) we are working on.
cc: @pirama-arumuga-nainar @yabinc
`if (ss.ss_family == AF_INET6 && IN6_IS_ADDR_V4MAPPED(&sin6.sin6_addr)) ` is essentially: ``` if (ss.ss_family == 10 && ((((&sin6.sin6_addr)->in6_u.u6_addr32[0]) == 0) && (((&sin6.sin6_addr)->in6_u.u6_addr32[1]) == 0) && (((&sin6.sin6_addr)->in6_u.u6_addr32[2]) == __builtin_bswap32(0x0000ffff)))) { ``` > I...
ok so here is a smaller repro case:https://godbolt.org/z/7b8dbMhvo (note i have renamed memcpy etc to prevent compiler from inlining). Looks like in both the cases (even when reinterpret cast is...
Oh there was a bug in my previous repro (`non-void function does not return a value in all control paths`). The modified one doesn't have bug when we move the...
Command line to repro the test: ``` $ ./bin/clang++ -std=c++20 -target riscv64-unknown-linux-gnu -O3 -march=rv64gcv a.cpp -o a.s -S -emit-llvm ``` Code: a.cpp ```cpp #include #include struct in6_u_t { unsigned u6_addr32[4];...
This is a bug in the code and not compiler. the reinterpret_cast is to a **reference** and in C++ references can't be null.
IMO once we take a reference to an object, all the loads from that reference should be valid (and hence can be speculated) ``` ((((&sin6.sin6_addr)->in6_u.u6_addr32[0]) == 0) && (((&sin6.sin6_addr)->in6_u.u6_addr32[1]) ==...
> but we should probably look at getting upstream's default changed?) makes sense, at least for android-riscv and maybe for linux-riscv as well
`lldb-server` is missing from clang-r475365/runtimes_ndk_cxx/riscv64/