[llvm-bugs] [Bug 44892] New: Regression with building with -fno-signed-zeros for AArch64

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Feb 13 00:57:32 PST 2020


https://bugs.llvm.org/show_bug.cgi?id=44892

            Bug ID: 44892
           Summary: Regression with building with -fno-signed-zeros for
                    AArch64
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: AArch64
          Assignee: unassignedbugs at nondot.org
          Reporter: martin at martin.st
                CC: arnaud.degrandmaison at arm.com,
                    llvm-bugs at lists.llvm.org, melanie.blower at intel.com,
                    peter.smith at linaro.org, Ties.Stuij at arm.com

Created attachment 23126
  --> https://bugs.llvm.org/attachment.cgi?id=23126&action=edit
Reduced reproduction sample

Since this commit:

commit abd09053bc7aa6144873c196a7d50aa6ce6ca430 (HEAD, refs/bisect/bad) 
Author: Melanie Blower <melanie.blower at intel.com>
Date:   Tue Feb 11 14:40:23 2020 -0800 

    Revert "Revert "Change clang option -ffp-model=precise to select
ffp-contract=on""

    This reverts commit 99c5bcbce89f07e68ccd89891a0300346705d013. 
    Change clang option -ffp-model=precise to select ffp-contract=on
    Including some small touch-ups to the original commit 

    Reviewers: rjmccall, Andy Kaylor 

    Differential Revision: https://reviews.llvm.org/D74436 

Building code for AArch64 with the -fno-signed-zeros flag now fails by hitting
an unreachable statement in TargetLowering.cpp (in SDValue
TargetLowering::getNegatedExpression):

$ cat af_flanger-preproc.c
typedef struct c c;
struct c {
  void *d
} g;
typedef struct {
  double *e
} f;
h, i, j;
k() {
  c c = g;
  f *l = c.d;
  double d, m = o(i, k), a, b;
  double *n = c.d;
  a = h * .5 - j;
  b = -n[h] * .5;
  d = a * m + b;
  l->e[0] = d;
}
$ clang -target aarch64-w64-mingw32 -w -c -O3 -fno-signed-zeros
af_flanger-preproc.c
Unknown code
UNREACHABLE executed at ../lib/CodeGen/SelectionDAG/TargetLowering.cpp:5804!
Stack dump:
0.      Program arguments:
/home/martin/code/llvm-project-bisect/llvm/build/bin/clang -target
aarch64-w64-mingw32 -w -c -O3 -fno-signed-zeros af_flanger-preproc.c 
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module 'af_flanger-preproc.c'.
4.      Running pass 'AArch64 Instruction Selection' on function '@k'
 #0 0x000055f8b7d9d9ea llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/home/martin/code/llvm-project-bisect/llvm/build/bin/clang+0x4a5f9ea)
 #1 0x000055f8b7d9b444 llvm::sys::RunSignalHandlers()
(/home/martin/code/llvm-project-bisect/llvm/build/bin/clang+0x4a5d444)
 #2 0x000055f8b7d9b6b5 llvm::sys::CleanupOnSignal(unsigned long)
(/home/martin/code/llvm-project-bisect/llvm/build/bin/clang+0x4a5d6b5)
 #3 0x000055f8b7d08dc8 CrashRecoverySignalHandler(int)
(/home/martin/code/llvm-project-bisect/llvm/build/bin/clang+0x49cadc8)
 #4 0x00007fb4491f3890 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x12890)
 #5 0x00007fb447ea4e97 raise
/build/glibc-OTsEL5/glibc-2.27/signal/../sysdeps/unix/sysv/linux/raise.c:51:0
 #6 0x00007fb447ea6801 abort /build/glibc-OTsEL5/glibc-2.27/stdlib/abort.c:81:0
 #7 0x000055f8b7d11eea
(/home/martin/code/llvm-project-bisect/llvm/build/bin/clang+0x49d3eea)
 #8 0x000055f8b8d4a19c
llvm::TargetLowering::getNegatedExpression(llvm::SDValue, llvm::SelectionDAG&,
bool, bool, unsigned int) const
(/home/martin/code/llvm-project-bisect/llvm/build/bin/clang+0x5a0c19c)
 #9 0x000055f8b8d4a5ba
llvm::TargetLowering::getNegatedExpression(llvm::SDValue, llvm::SelectionDAG&,
bool, bool, unsigned int) const
(/home/martin/code/llvm-project-bisect/llvm/build/bin/clang+0x5a0c5ba)
#10 0x000055f8b8b2d4c8 (anonymous
namespace)::DAGCombiner::visitFMA(llvm::SDNode*)
(/home/martin/code/llvm-project-bisect/llvm/build/bin/clang+0x57ef4c8)
#11 0x000055f8b8b72ac7 (anonymous namespace)::DAGCombiner::visit(llvm::SDNode*)
(/home/martin/code/llvm-project-bisect/llvm/build/bin/clang+0x5834ac7)
#12 0x000055f8b8b73c5f (anonymous
namespace)::DAGCombiner::combine(llvm::SDNode*)
(/home/martin/code/llvm-project-bisect/llvm/build/bin/clang+0x5835c5f)
#13 0x000055f8b8b75a01 llvm::SelectionDAG::Combine(llvm::CombineLevel,
llvm::AAResults*, llvm::CodeGenOpt::Level)
(/home/martin/code/llvm-project-bisect/llvm/build/bin/clang+0x5837a01)
#14 0x000055f8b8c58073 llvm::SelectionDAGISel::CodeGenAndEmitDAG()
(/home/martin/code/llvm-project-bisect/llvm/build/bin/clang+0x591a073)
#15 0x000055f8b8c5da9b
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&)
(/home/martin/code/llvm-project-bisect/llvm/build/bin/clang+0x591fa9b)
#16 0x000055f8b8c5f473
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&)
(.part.867)
(/home/martin/code/llvm-project-bisect/llvm/build/bin/clang+0x5921473)
#17 0x000055f8b72b3a1e
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
(/home/martin/code/llvm-project-bisect/llvm/build/bin/clang+0x3f75a1e)
#18 0x000055f8b76fea01 llvm::FPPassManager::runOnFunction(llvm::Function&)
(/home/martin/code/llvm-project-bisect/llvm/build/bin/clang+0x43c0a01)
#19 0x000055f8b76ff4b9 llvm::FPPassManager::runOnModule(llvm::Module&)
(/home/martin/code/llvm-project-bisect/llvm/build/bin/clang+0x43c14b9)
#20 0x000055f8b76ff891 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/home/martin/code/llvm-project-bisect/llvm/build/bin/clang+0x43c1891)
#21 0x000055f8b83d5186 (anonymous
namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction,
std::unique_ptr<llvm::raw_pwrite_stream,
std::default_delete<llvm::raw_pwrite_stream> >)
(/home/martin/code/llvm-project-bisect/llvm/build/bin/clang+0x5097186)
#22 0x000055f8b83d6b95 clang::EmitBackendOutput(clang::DiagnosticsEngine&,
clang::HeaderSearchOptions const&, clang::CodeGenOptions const&,
clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout
const&, llvm::Module*, clang::BackendAction,
std::unique_ptr<llvm::raw_pwrite_stream,
std::default_delete<llvm::raw_pwrite_stream> >)
(/home/martin/code/llvm-project-bisect/llvm/build/bin/clang+0x5098b95)
#23 0x000055f8b8803b35
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(/home/martin/code/llvm-project-bisect/llvm/build/bin/clang+0x54c5b35)
#24 0x000055f8b968b089 clang::ParseAST(clang::Sema&, bool, bool)
(/home/martin/code/llvm-project-bisect/llvm/build/bin/clang+0x634d089)
#25 0x000055f8b8803cb8 clang::CodeGenAction::ExecuteAction()
(/home/martin/code/llvm-project-bisect/llvm/build/bin/clang+0x54c5cb8)
#26 0x000055f8b871d529 clang::FrontendAction::Execute()
(/home/martin/code/llvm-project-bisect/llvm/build/bin/clang+0x53df529)
#27 0x000055f8b8684742
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/home/martin/code/llvm-project-bisect/llvm/build/bin/clang+0x5346742)
#28 0x000055f8b87ddcec
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/home/martin/code/llvm-project-bisect/llvm/build/bin/clang+0x549fcec)
#29 0x000055f8b687a5a4 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/home/martin/code/llvm-project-bisect/llvm/build/bin/clang+0x353c5a4)
#30 0x000055f8b68734c9 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&)
(/home/martin/code/llvm-project-bisect/llvm/build/bin/clang+0x35354c9)
#31 0x000055f8b8566665 void llvm::function_ref<void
()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>
>, std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >*, bool*) const::'lambda'()>(long)
(/home/martin/code/llvm-project-bisect/llvm/build/bin/clang+0x5228665)
#32 0x000055f8b7d08ea3
llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>)
(/home/martin/code/llvm-project-bisect/llvm/build/bin/clang+0x49caea3)
#33 0x000055f8b8567148
clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>
>, std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >*, bool*) const
(/home/martin/code/llvm-project-bisect/llvm/build/bin/clang+0x5229148)
#34 0x000055f8b8540585
clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&,
clang::driver::Command const*&) const
(/home/martin/code/llvm-project-bisect/llvm/build/bin/clang+0x5202585)
#35 0x000055f8b8541041
clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const
(/home/martin/code/llvm-project-bisect/llvm/build/bin/clang+0x5203041)
#36 0x000055f8b85496c9
clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&)
(/home/martin/code/llvm-project-bisect/llvm/build/bin/clang+0x520b6c9)
#37 0x000055f8b6877a3f main
(/home/martin/code/llvm-project-bisect/llvm/build/bin/clang+0x3539a3f)
#38 0x00007fb447e87b97 __libc_start_main
/build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:344:0
#39 0x000055f8b687302a _start
(/home/martin/code/llvm-project-bisect/llvm/build/bin/clang+0x353502a)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200213/abc6d453/attachment-0001.html>


More information about the llvm-bugs mailing list