File tree Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -1923,11 +1923,8 @@ ValueTrackerResult ValueTracker::getNextSourceFromBitcast() {
19231923 // Bitcasts with more than one def are not supported.
19241924 if (Def->getDesc ().getNumDefs () != 1 )
19251925 return ValueTrackerResult ();
1926- const MachineOperand DefOp = Def->getOperand (DefIdx);
1927- if (DefOp.getSubReg () != DefSubReg)
1928- // If we look for a different subreg, it means we want a subreg of the src.
1929- // Bails as we do not support composing subregs yet.
1930- return ValueTrackerResult ();
1926+
1927+ assert (!Def->getOperand (DefIdx).getSubReg () && " no subregister defs in SSA" );
19311928
19321929 unsigned SrcIdx = Def->getNumOperands ();
19331930 for (unsigned OpIdx = DefIdx + 1 , EndOpIdx = SrcIdx; OpIdx != EndOpIdx;
@@ -1950,6 +1947,8 @@ ValueTrackerResult ValueTracker::getNextSourceFromBitcast() {
19501947 if (SrcIdx >= Def->getNumOperands ())
19511948 return ValueTrackerResult ();
19521949
1950+ const MachineOperand &DefOp = Def->getOperand (DefIdx);
1951+
19531952 // Stop when any user of the bitcast is a SUBREG_TO_REG, replacing with a COPY
19541953 // will break the assumed guarantees for the upper bits.
19551954 for (const MachineInstr &UseMI : MRI.use_nodbg_instructions (DefOp.getReg ())) {
Original file line number Diff line number Diff line change @@ -6,8 +6,6 @@ define void @foo(double %arg) {
66; CHECK-LABEL: foo:
77; CHECK: ## %bb.0: ## %bb
88; CHECK-NEXT: vmovq %xmm0, %rax
9- ; CHECK-NEXT: vmovd %eax, %xmm0
10- ; CHECK-NEXT: vmovq %xmm0, %rax
119; CHECK-NEXT: movl %eax, (%rax)
1210; CHECK-NEXT: movq $0, (%rax)
1311; CHECK-NEXT: retq
You can’t perform that action at this time.
0 commit comments