[PATCH] D154852: [FuncSpec] Add Phi nodes to the InstCostVisitor.

Khem Raj via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 26 02:07:22 PDT 2023


raj.khem reopened this revision.
raj.khem added a comment.
This revision is now accepted and ready to land.

I am seeing a crash in libLLVM-17.so when compiling socat on aarch64 and have narrowed it down to this change.  here is testcase 
https://uclibc.org/~kraj/nestlex.zip

compiler cmdline is

  aarch64-yoe-linux-clang -target aarch64-yoe-linux nestlex.i -c -O

results in
segmentation fault (core dumped)  ../recipe-sysroot-native/usr/bin/aarch64-yoe-linux/aarch64-yoe-linux-clang

works ok on reverting this patch from 17.x release branch

here is stack trace

                  Stack trace of thread 1747742:
                  #0  0x00007f84b9e8eaa7 _ZN4llvm12hash_combineIJhhtNS_9hash_codeES1_PNS_4TypeEEEES1_DpRKT_ (libLLVM-17.so + 0xc8eaa7)
                  #1  0x00007f84b9e9a3ae _ZN4llvm17ConstantUniqueMapINS_12ConstantExprEE11getOrCreateEPNS_4TypeENS_19ConstantExprKeyTypeE (libLLVM-17.so + 0xc9a3ae)
                  #2  0x00007f84b9ea14e4 _ZN4llvm12ConstantExpr11getIntToPtrEPNS_8ConstantEPNS_4TypeEb (libLLVM-17.so + 0xca14e4)
                  #3  0x00007f84bb4f3dcc _ZN12_GLOBAL__N_123SymbolicallyEvaluateGEPEPKN4llvm11GEPOperatorENS0_8ArrayRefIPNS0_8ConstantEEERKNS0_10DataLayoutEPKNS0_17TargetLibraryInfoE (libLLVM-
  17.so + 0x22f3dcc)
                  #4  0x00007f84bb4f44d3 _ZN12_GLOBAL__N_128ConstantFoldInstOperandsImplEPKN4llvm5ValueEjNS0_8ArrayRefIPNS0_8ConstantEEERKNS0_10DataLayoutEPKNS0_17TargetLibraryInfoE (libLLVM-1
  7.so + 0x22f44d3)
                  #5  0x00007f84bb1b6e37 _ZN4llvm15InstCostVisitor22visitGetElementPtrInstERNS_17GetElementPtrInstE (libLLVM-17.so + 0x1fb6e37)
                  #6  0x00007f84bb1bb36b _ZN4llvm15InstCostVisitor12getUserBonusEPNS_11InstructionEPNS_5ValueEPNS_8ConstantE (libLLVM-17.so + 0x1fbb36b)
                  #7  0x00007f84bb1bb711 _ZN4llvm15InstCostVisitor12getUserBonusEPNS_11InstructionEPNS_5ValueEPNS_8ConstantE (libLLVM-17.so + 0x1fbb711)
                  #8  0x00007f84bb1bb711 _ZN4llvm15InstCostVisitor12getUserBonusEPNS_11InstructionEPNS_5ValueEPNS_8ConstantE (libLLVM-17.so + 0x1fbb711)
                  #9  0x00007f84bb1bb711 _ZN4llvm15InstCostVisitor12getUserBonusEPNS_11InstructionEPNS_5ValueEPNS_8ConstantE (libLLVM-17.so + 0x1fbb711)
                  #10 0x00007f84bb1bb711 _ZN4llvm15InstCostVisitor12getUserBonusEPNS_11InstructionEPNS_5ValueEPNS_8ConstantE (libLLVM-17.so + 0x1fbb711)
                  #11 0x00007f84bb1bb711 _ZN4llvm15InstCostVisitor12getUserBonusEPNS_11InstructionEPNS_5ValueEPNS_8ConstantE (libLLVM-17.so + 0x1fbb711)
                  #12 0x00007f84bb1bb711 _ZN4llvm15InstCostVisitor12getUserBonusEPNS_11InstructionEPNS_5ValueEPNS_8ConstantE (libLLVM-17.so + 0x1fbb711)
                  #13 0x00007f84bb1bb711 _ZN4llvm15InstCostVisitor12getUserBonusEPNS_11InstructionEPNS_5ValueEPNS_8ConstantE (libLLVM-17.so + 0x1fbb711)
                  #14 0x00007f84bb1bb711 _ZN4llvm15InstCostVisitor12getUserBonusEPNS_11InstructionEPNS_5ValueEPNS_8ConstantE (libLLVM-17.so + 0x1fbb711)
                  #15 0x00007f84bb1bb711 _ZN4llvm15InstCostVisitor12getUserBonusEPNS_11InstructionEPNS_5ValueEPNS_8ConstantE (libLLVM-17.so + 0x1fbb711)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D154852/new/

https://reviews.llvm.org/D154852



More information about the llvm-commits mailing list