1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -mtriple=x86_64-apple-macosx -pre-RA-sched=source | FileCheck %s 2*9880d681SAndroid Build Coastguard Worker 3*9880d681SAndroid Build Coastguard Worker; Teach two-address pass to update the "source" map so it doesn't perform a 4*9880d681SAndroid Build Coastguard Worker; non-profitable commute using outdated info. The test case would still fail 5*9880d681SAndroid Build Coastguard Worker; because of poor pre-RA schedule. That will be fixed by MI scheduler. 6*9880d681SAndroid Build Coastguard Worker; rdar://11472010 7*9880d681SAndroid Build Coastguard Workerdefine i32 @t(i32 %mask) nounwind readnone ssp { 8*9880d681SAndroid Build Coastguard Workerentry: 9*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: t: 10*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: mov 11*9880d681SAndroid Build Coastguard Worker %sub = add i32 %mask, -65535 12*9880d681SAndroid Build Coastguard Worker %shr = lshr i32 %sub, 23 13*9880d681SAndroid Build Coastguard Worker %and = and i32 %mask, 1 14*9880d681SAndroid Build Coastguard Worker %add = add i32 %shr, %and 15*9880d681SAndroid Build Coastguard Worker ret i32 %add 16*9880d681SAndroid Build Coastguard Worker} 17