AMDGPU/GlobalISel: Select G_INSERT_VECTOR_ELT
Description
Description
Details
Details
- Committed
arsenm Jan 22 2020, 8:00 AM - Parents
- rG3524d4412cff: AMDGPU/GlobalISel: Fix RegBankSelect for G_INSERT_VECTOR_ELT
- Branches
- Unknown
- Tags
Event Timeline
Comment Actions
This patch broke the UBSan build bots here.
Unfortunately to roll this change back, all the dependent changes have to be rolled back as well. This includes:
AMDGPU/GlobalISel: Select llvm.amdgcn.mov.dpp c05f23e409a7 AMDGPU/GlobalISel: Select llvm.amdgcn.mov.dpp8 dd09ec1208bd AMDGPU/GlobalISel: Keep G_BITCAST out of waterfall loop bb562d1af0e9 AMDGPU/GlobalISel: Fold add of constant into G_INSERT_VECTOR_ELT 52ec7379adfa AMDGPU: Fix element size assertion 0bf434ccd562
Please let me know if you would prefer to fix this directly (preferably ASAP to bring the bots back online), or whether I should proceed with the rollback. Thanks :)
I've copied the failure below for your convenience.
FAIL: LLVM :: CodeGen/AMDGPU/GlobalISel/insertelement.ll (7926 of 35441) ******************** TEST 'LLVM :: CodeGen/AMDGPU/GlobalISel/insertelement.ll' FAILED ******************** Script: -- : 'RUN: at line 2'; /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/llc -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -verify-machineinstrs < /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll | /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/FileCheck -check-prefix=GPRIDX /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll : 'RUN: at line 3'; /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/llc -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx1010 -verify-machineinstrs < /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll | /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/FileCheck -check-prefix=MOVREL /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll : 'RUN: at line 4'; not /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/llc -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=fiji -verify-machineinstrs -o /dev/null /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll 2>&1 | /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/FileCheck -check-prefix=ERR /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll -- Exit Code: 1 Command Output (stderr): -- /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Target/AMDGPU/GCNRegBankReassign.cpp:316:24: runtime error: shift exponent 32 is too large for 32-bit type 'int' #0 0xc6c148 in getRegBankMask /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Target/AMDGPU/GCNRegBankReassign.cpp:316:24 #1 0xc6c148 in (anonymous namespace)::GCNRegBankReassign::analyzeInst(llvm::MachineInstr const&, unsigned int&, unsigned int, int) /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Target/AMDGPU/GCNRegBankReassign.cpp:391:21 #2 0xc6ac05 in (anonymous namespace)::GCNRegBankReassign::collectCandidates(llvm::MachineFunction&, bool) /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Target/AMDGPU/GCNRegBankReassign.cpp:699:30 #3 0xc68c85 in (anonymous namespace)::GCNRegBankReassign::runOnMachineFunction(llvm::MachineFunction&) /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Target/AMDGPU/GCNRegBankReassign.cpp:755:26 #4 0x1f51399 in llvm::MachineFunctionPass::runOnFunction(llvm::Function&) /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/CodeGen/MachineFunctionPass.cpp:73:13 #5 0x241f5f8 in llvm::FPPassManager::runOnFunction(llvm::Function&) /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1481:27 #6 0x1a73db5 in RunPassOnSCC /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Analysis/CallGraphSCCPass.cpp:176:25 #7 0x1a73db5 in RunAllPassesOnSCC /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Analysis/CallGraphSCCPass.cpp:441:16 #8 0x1a73db5 in (anonymous namespace)::CGPassManager::runOnModule(llvm::Module&) /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Analysis/CallGraphSCCPass.cpp:497:18 #9 0x242010b in runOnModule /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1582:27 #10 0x242010b in llvm::legacy::PassManagerImpl::run(llvm::Module&) /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1694:44 #11 0x708ef9 in compileModule(char**, llvm::LLVMContext&) /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/tools/llc/llc.cpp:617:8 #12 0x70671b in main /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/tools/llc/llc.cpp:356:22 #13 0x7f779ab292e0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202e0) #14 0x6e4de9 in _start (/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/llc+0x6e4de9) SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Target/AMDGPU/GCNRegBankReassign.cpp:316:24 in /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll:1732:17: error: MOVREL-LABEL: expected string not found in input ; MOVREL-LABEL: dyn_insertelement_v32i32_v_v_s: ^ <stdin>:1768:33: note: scanning from here dyn_insertelement_v32i32_s_s_s: ; @dyn_insertelement_v32i32_s_s_s ^ <stdin>:1768:36: note: possible intended match here dyn_insertelement_v32i32_s_s_s: ; @dyn_insertelement_v32i32_s_s_s ^ -- ******************** Testing: 0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.. Testing Time: 133.31s ******************** Failing Tests (1): LLVM :: CodeGen/AMDGPU/GlobalISel/insertelement.ll
Comment Actions
This also isn't caused by the patches, and is a pre-existing bug. We just didn't have any other tests stressing these huge registers