[PATCH] D65057: [ConstantFolding] Use FoldBitCast correctly
Jameson Nash via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 21 09:35:35 PDT 2019
vtjnash added a comment.
The added assertion will detect this:
[109/110] Running lit suite /data/vtjnash/julia/deps/srccache/llvm-svn/test/Transforms [19/519]
FAIL: LLVM :: Transforms/InstSimplify/vector_ptr_bitcast.ll (2527 of 4814)
******************** TEST 'LLVM :: Transforms/InstSimplify/vector_ptr_bitcast.ll' FAILED ********************
Script:
--
: 'RUN: at line 1'; /data/vtjnash/julia/deps/scratch/llvm-svn/build_Release+Asserts/bin/opt -S -instsimplify < /data/vtjnash/julia/deps/srccache/llvm-svn/test/Transforms/InstSimpl
ify/vector_ptr_bitcast.ll | /data/vtjnash/julia/deps/scratch/llvm-svn/build_Release+Asserts/bin/FileCheck /data/vtjnash/julia/deps/srccache/llvm-svn/test/Transforms/InstSimplify/vec
tor_ptr_bitcast.ll
--
Exit Code: 2
Command Output (stderr):
--
opt: /data/vtjnash/julia/deps/srccache/llvm-svn/lib/Analysis/ConstantFolding.cpp:97: llvm::Constant* {anonymous}::FoldBitCast(llvm::Constant*, llvm::Type*, const llvm::DataLayout&):
Assertion `CastInst::castIsValid(Instruction::BitCast, C, DestTy) && "Invalid constantexpr bitcast!"' failed.
Stack dump:
0. Program arguments: /data/vtjnash/julia/deps/scratch/llvm-svn/build_Release+Asserts/bin/opt -S -instsimplify
1. Running pass 'Function Pass Manager' on module '<stdin>'.
2. Running pass 'Remove redundant instructions' on function '@fn'
#0 0x00007f19a6bdb9aa llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/data/vtjnash/julia/deps/scratch/llvm-svn/build_Release+Asserts/bin/../lib/libLLVM-10svn.so+0x8cd9aa)
#1 0x00007f19a6bd9654 llvm::sys::RunSignalHandlers() (/data/vtjnash/julia/deps/scratch/llvm-svn/build_Release+Asserts/bin/../lib/libLLVM-10svn.so+0x8cb654)
#2 0x00007f19a6bd9792 SignalHandler(int) (/data/vtjnash/julia/deps/scratch/llvm-svn/build_Release+Asserts/bin/../lib/libLLVM-10svn.so+0x8cb792)
#3 0x00007f19a59baf20 (/lib/x86_64-linux-gnu/libc.so.6+0x3ef20)
#4 0x00007f19a59bae97 raise /build/glibc-OTsEL5/glibc-2.27/signal/../sysdeps/unix/sysv/linux/raise.c:51:0
#5 0x00007f19a59bc801 abort /build/glibc-OTsEL5/glibc-2.27/stdlib/abort.c:81:0
#6 0x00007f19a59ac39a __assert_fail_base /build/glibc-OTsEL5/glibc-2.27/assert/assert.c:89:0
#7 0x00007f19a59ac412 (/lib/x86_64-linux-gnu/libc.so.6+0x30412)
#8 0x00007f19a7d062b3 (/data/vtjnash/julia/deps/scratch/llvm-svn/build_Release+Asserts/bin/../lib/libLLVM-10svn.so+0x19f82b3)
#9 0x00007f19a7d06f21 (anonymous namespace)::FoldReinterpretLoadFromConstPtr(llvm::Constant*, llvm::Type*, llvm::DataLayout const&) (/data/vtjnash/julia/deps/scratch/llvm-svn/build
_Release+Asserts/bin/../lib/libLLVM-10svn.so+0x19f8f21)
#10 0x00007f19a7d0730f llvm::ConstantFoldLoadFromConstPtr(llvm::Constant*, llvm::Type*, llvm::DataLayout const&) (/data/vtjnash/julia/deps/scratch/llvm-svn/build_Release+Asserts/bin
/../lib/libLLVM-10svn.so+0x19f930f)
#11 0x00007f19a7d0dd01 llvm::ConstantFoldInstruction(llvm::Instruction*, llvm::DataLayout const&, llvm::TargetLibraryInfo const*) (/data/vtjnash/julia/deps/scratch/llvm-svn/build_Re
lease+Asserts/bin/../lib/libLLVM-10svn.so+0x19ffd01)
#12 0x00007f19a7d80f0a llvm::SimplifyInstruction(llvm::Instruction*, llvm::SimplifyQuery const&, llvm::OptimizationRemarkEmitter*) (/data/vtjnash/julia/deps/scratch/llvm-svn/build_R
elease+Asserts/bin/../lib/libLLVM-10svn.so+0x1a72f0a)
#13 0x00007f19a791841f runImpl(llvm::Function&, llvm::SimplifyQuery const&, llvm::OptimizationRemarkEmitter*) (.constprop.115) (/data/vtjnash/julia/deps/scratch/llvm-svn/build_Relea
se+Asserts/bin/../lib/libLLVM-10svn.so+0x160a41f)
#14 0x00007f19a791a924 (anonymous namespace)::InstSimplifyLegacyPass::runOnFunction(llvm::Function&) (/data/vtjnash/julia/deps/scratch/llvm-svn/build_Release+Asserts/bin/../lib/libL
LVM-10svn.so+0x160c924)
#15 0x00007f19a6d0e359 llvm::FPPassManager::runOnFunction(llvm::Function&) (/data/vtjnash/julia/deps/scratch/llvm-svn/build_Release+Asserts/bin/../lib/libLLVM-10svn.so+0xa00359)
#16 0x00007f19a6d0e451 llvm::FPPassManager::runOnModule(llvm::Module&) (/data/vtjnash/julia/deps/scratch/llvm-svn/build_Release+Asserts/bin/../lib/libLLVM-10svn.so+0xa00451)
#17 0x00007f19a6d0d5b1 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/data/vtjnash/julia/deps/scratch/llvm-svn/build_Release+Asserts/bin/../lib/libLLVM-10svn.so+0x9ff5b1)
#18 0x000055efb10b7765 main (/data/vtjnash/julia/deps/scratch/llvm-svn/build_Release+Asserts/bin/opt+0x1e765)
#19 0x00007f19a599db97 __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:344:0
#20 0x000055efb10b802a _start (/data/vtjnash/julia/deps/scratch/llvm-svn/build_Release+Asserts/bin/opt+0x1f02a)
FileCheck error: '-' is empty.
FileCheck command line: /data/vtjnash/julia/deps/scratch/llvm-svn/build_Release+Asserts/bin/FileCheck /data/vtjnash/julia/deps/srccache/llvm-svn/test/Transforms/InstSimplify/vector
_ptr_bitcast.ll
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65057/new/
https://reviews.llvm.org/D65057
More information about the llvm-commits
mailing list