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() {
1923
1923
// Bitcasts with more than one def are not supported.
1924
1924
if (Def->getDesc ().getNumDefs () != 1 )
1925
1925
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" );
1931
1928
1932
1929
unsigned SrcIdx = Def->getNumOperands ();
1933
1930
for (unsigned OpIdx = DefIdx + 1 , EndOpIdx = SrcIdx; OpIdx != EndOpIdx;
@@ -1950,6 +1947,8 @@ ValueTrackerResult ValueTracker::getNextSourceFromBitcast() {
1950
1947
if (SrcIdx >= Def->getNumOperands ())
1951
1948
return ValueTrackerResult ();
1952
1949
1950
+ const MachineOperand &DefOp = Def->getOperand (DefIdx);
1951
+
1953
1952
// Stop when any user of the bitcast is a SUBREG_TO_REG, replacing with a COPY
1954
1953
// will break the assumed guarantees for the upper bits.
1955
1954
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) {
6
6
; CHECK-LABEL: foo:
7
7
; CHECK: ## %bb.0: ## %bb
8
8
; CHECK-NEXT: vmovq %xmm0, %rax
9
- ; CHECK-NEXT: vmovd %eax, %xmm0
10
- ; CHECK-NEXT: vmovq %xmm0, %rax
11
9
; CHECK-NEXT: movl %eax, (%rax)
12
10
; CHECK-NEXT: movq $0, (%rax)
13
11
; CHECK-NEXT: retq
You can’t perform that action at this time.
0 commit comments