[llvm] r355981 - IR: Add immarg attribute

Michel Dänzer via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 14 04:01:57 PDT 2019


Hi Matt,


On 2019-03-12 10:02 p.m., Matt Arsenault via llvm-commits wrote:
> Author: arsenm
> Date: Tue Mar 12 14:02:54 2019
> New Revision: 355981
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=355981&view=rev
> Log:
> IR: Add immarg attribute

This broke a couple of piglit tests for me with radeonsi on Bonaire,
e.g.:

Starting program: /home/daenzer/src/piglit-git/piglit/bin/arb_shader_image_load_store-coherency --quick -auto -fbo
[...]
arb_shader_image_load_store-coherency: ../lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp:1641: llvm::Value *llvm::InstCombiner::SimplifyDemandedVectorElts(llvm::Value *, llvm::APInt, llvm::APInt &, unsigned int): Assertion `cast<ConstantInt>( II->getArgOperand( II->getNumOperands() - 2))->getZExtValue() == 0' failed.

Thread 9 "arb_shader:sh5" received signal SIGABRT, Aborted.
[Switching to Thread 0x7fffe97fa700 (LWP 14721)]
__GI_raise (sig=sig at entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50	../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  __GI_raise (sig=sig at entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0x00007ffff7268535 in __GI_abort () at abort.c:79
#2  0x00007ffff726840f in __assert_fail_base (fmt=0x7ffff73caee0 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x7ffff26f1a28 "cast<ConstantInt>( II->getArgOperand( II->getNumOperands() - 2))->getZExtValue() == 0", 
    file=0x7ffff204cdb3 "../lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp", line=1641, function=<optimized out>) at assert.c:92
#3  0x00007ffff72760f2 in __GI___assert_fail (assertion=0x7ffff26f1a28 "cast<ConstantInt>( II->getArgOperand( II->getNumOperands() - 2))->getZExtValue() == 0", file=0x7ffff204cdb3 "../lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp", line=1641, 
    function=0x7ffff27098b9 "llvm::Value *llvm::InstCombiner::SimplifyDemandedVectorElts(llvm::Value *, llvm::APInt, llvm::APInt &, unsigned int)") at assert.c:101
#4  0x00007ffff3c63987 in llvm::InstCombiner::SimplifyDemandedVectorElts (this=0x7fffe97f4ab0, V=<optimized out>, DemandedElts=..., UndefElts=..., Depth=<optimized out>) at ../lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp:1639
#5  0x00007ffff3bf0232 in llvm::InstCombiner::visitCallInst (this=0x7fffe97f4ab0, CI=...) at ../lib/Transforms/InstCombine/InstCombineCalls.cpp:1917
#6  0x00007ffff3bc2069 in llvm::InstCombiner::run (this=<optimized out>) at ../lib/Transforms/InstCombine/InstructionCombining.cpp:3241
#7  0x00007ffff3bc3dd3 in combineInstructionsOverFunction (F=..., Worklist=..., AA=0x7fffc801c6e0, AC=..., TLI=..., DT=..., ORE=..., ExpensiveCombines=<optimized out>, LI=0x555557771a90) at ../lib/Transforms/InstCombine/InstructionCombining.cpp:3474
#8  0x00007ffff3bc4482 in llvm::InstructionCombiningPass::runOnFunction (this=<optimized out>, F=...) at ../lib/Transforms/InstCombine/InstructionCombining.cpp:3533
#9  0x00007ffff32c3883 in llvm::FPPassManager::runOnFunction (this=<optimized out>, F=...) at ../lib/IR/LegacyPassManager.cpp:1643
#10 0x00007ffff32c3bd8 in llvm::FPPassManager::runOnModule (this=<optimized out>, M=...) at ../lib/IR/LegacyPassManager.cpp:1678
#11 0x00007ffff32c4041 in (anonymous namespace)::MPPassManager::runOnModule (this=<optimized out>, M=...) at ../lib/IR/LegacyPassManager.cpp:1743
#12 llvm::legacy::PassManagerImpl::run (this=0x55555776bb30, M=...) at ../lib/IR/LegacyPassManager.cpp:1856
#13 0x00007ffff322629e in LLVMRunPassManager (PM=0x2, M=0x7fffe97f3b90) at ../lib/IR/Core.cpp:3957
#14 0x00007ffff51194cd in si_llvm_optimize_module (ctx=ctx at entry=0x7fffe97f5a50) at ../src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c:1157
#15 0x00007ffff510a9cd in si_compile_tgsi_shader (sscreen=sscreen at entry=0x555557620b60, compiler=compiler at entry=0x555557621368, shader=shader at entry=0x7fffc8000b20, debug=debug at entry=0x5555580607b0) at ../src/gallium/drivers/radeonsi/si_shader.c:6917
#16 0x00007ffff50c4aff in si_init_shader_selector_async (job=job at entry=0x555558060790, thread_index=thread_index at entry=5) at ../src/gallium/drivers/radeonsi/si_state_shaders.c:2086
#17 0x00007ffff551a49a in util_queue_thread_func (input=input at entry=0x55555761dc90) at ../src/util/u_queue.c:286
#18 0x00007ffff5519f28 in impl_thrd_routine (p=<optimized out>) at ../include/c11/threads_posix.h:87
#19 0x00007ffff65bffa3 in start_thread (arg=<optimized out>) at pthread_create.c:486
#20 0x00007ffff733f82f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95



-- 
Earthling Michel Dänzer               |              https://www.amd.com
Libre software enthusiast             |             Mesa and X developer


More information about the llvm-commits mailing list