Closed
Description
There are some test failures in pull request #98632 when LiveIntervals
analysis happens before TwoAddressInstructionPass
, because SIInstrInfo::convertToThreeAddress
doesn't handle live intervals after folding immediate values:
llvm-project/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
Lines 3949 to 3961 in ae63db7
The live interval of
DefReg
is no longer valid.
In #66775, -early-live-intervals
will not work when using -run-pass
, the Liveintervals LIS
in TwoAddressInstructionPass
is nullptr
when I debugging this part. A possible way to test -early-live-intervals
is using:
llc -march=amdgcn -mcpu=gfx1010 %s -run-pass liveintervals -run-pass twoaddressinstruction -verify-machineinstrs -o -
but llc
will crash.