diff options
author | Valery Pykhtin <valery.pykhtin@gmail.com> | 2025-04-01 10:27:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-01 10:27:58 +0200 |
commit | af0b0ce665e2a36dd60c2aa70e78cc54cf20b7e3 (patch) | |
tree | 43adbb0134ade0dddcc9bd2d6769fae04ab6bdf1 /llvm/lib/Bitcode | |
parent | 1cf6786e322ddc787d793dbb48d59b4f9827fef3 (diff) | |
download | llvm-af0b0ce665e2a36dd60c2aa70e78cc54cf20b7e3.zip llvm-af0b0ce665e2a36dd60c2aa70e78cc54cf20b7e3.tar.gz llvm-af0b0ce665e2a36dd60c2aa70e78cc54cf20b7e3.tar.bz2 |
[AMDGPU] Fix SIFoldOperandsImpl::tryFoldZeroHighBits when met non-reg src1 operand. (#133761)
This happens when a constant is propagated to a V_AND 0xFFFF, reg
instruction.
Fixes failures like:
```
llc: /github/llvm-project/llvm/include/llvm/CodeGen/MachineOperand.h:366: llvm::Register llvm::MachineOperand::getReg() const: Assertion `isReg() && "This is not a register operand!"' failed.
Stack dump:
0. Program arguments: /github/llvm-project/build/Debug/bin/llc -mtriple=amdgcn -mcpu=gfx1101 -verify-machineinstrs -run-pass si-fold-operands /github/llvm-project/llvm/test/CodeGen/AMDGPU/fold-zero-high-bits-skips-non-reg.mir -o -
1. Running pass 'Function Pass Manager' on module '/github/llvm-project/llvm/test/CodeGen/AMDGPU/fold-zero-high-bits-skips-non-reg.mir'.
2. Running pass 'SI Fold Operands' on function '@test_tryFoldZeroHighBits_skips_nonreg'
...
#12 0x00007f5a55005cfc llvm::MachineOperand::getReg() const /github/llvm-project/llvm/include/llvm/CodeGen/MachineOperand.h:0:5
#13 0x00007f5a555c6bf5 (anonymous namespace)::SIFoldOperandsImpl::tryFoldZeroHighBits(llvm::MachineInstr&) const /github/llvm-project/llvm/lib/Target/AMDGPU/SIFoldOperands.cpp:1459:36
#14 0x00007f5a555c63ad (anonymous namespace)::SIFoldOperandsImpl::run(llvm::MachineFunction&) /github/llvm-project/llvm/lib/Target/AMDGPU/SIFoldOperands.cpp:2455:11
#15 0x00007f5a555c6780 (anonymous namespace)::SIFoldOperandsLegacy::runOnMachineFunction
```
Diffstat (limited to 'llvm/lib/Bitcode')
0 files changed, 0 insertions, 0 deletions