[PATCH] D126494: [clang] avoid assert due to device treated long double as double

2022-05-26 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. This doesn't make sense to me. If clang and LLVM disagree about the layout of a type, you are going to run into trouble. If you haven't yet, it's a matter of time. Looking at AMDGPUTargetInfo::setAuxTarget, maybe LongDoubleFormat is somehow inconsistent with LongDou

[PATCH] D126494: [clang] avoid assert due to device treated long double as double

2022-05-26 Thread Chi Chun Chen via Phabricator via cfe-commits
cchen added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:4654 + bool IsLongDouble = BType && BType->getKind() == BuiltinType::LongDouble; + bool IsDevice = getLangOpts().HIP || getLangOpts().CUDA || + getLangOpts().OpenMPIsDevice

[PATCH] D126494: [clang] avoid assert due to device treated long double as double

2022-05-26 Thread Chi Chun Chen via Phabricator via cfe-commits
cchen created this revision. Herald added a project: All. cchen requested review of this revision. Herald added a reviewer: jdoerfert. Herald added subscribers: cfe-commits, sstefan1. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D126494 Files: c