Skip to content

[AMDGPU] Assertion failure in fixVALUMaskWriteHazard #172331

@jayfoad

Description

@jayfoad

With this test case:

; RUN: llc -mtriple=amdgcn -mcpu=gfx1100 -mattr=+wavefrontsize64 < %s

define amdgpu_cs i32 @main(i32 %arg, i32 %arg1) {
bb:
  %i = udiv i32 %arg, %arg1
  %i2 = uitofp i32 %i to float
  %i3 = udiv i32 1, %arg
  %i4 = uitofp i32 %i3 to float
  %i5 = call float @llvm.fma.f32(float %i2, float 0.000000e+00, float %i4)
  %i6 = fptosi float %i5 to i32
  %i7 = call i32 @func(i32 0, i32 %i6)
  ret i32 %i7
}

declare i32 @func(i32, i32)

I get:

$ llc -mtriple=amdgcn -mcpu=gfx1100 -mattr=+wavefrontsize64 < r.ll
llc: include/llvm/CodeGen/MachineInstrBundleIterator.h:135: llvm::MachineInstrBundleIterator<llvm::MachineInstr, true>::MachineInstrBundleIterator(instr_iterator) [Ty = llvm::MachineInstr, IsReverse = true]: Assertion `(!MI.getNodePtr() || MI.isEnd() || !MI->isBundledWithPred()) && "It's not legal to initialize MachineInstrBundleIterator with a " "bundled MI"' failed.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions