1 ; RUN: llc -mtriple=i686-- -mcpu=i486 -o - %s | FileCheck %s
3 ; Main test here was that ISelDAG could cope with a MachineNode in the chain
4 ; from the first load to the "X86ISD::SUB". Previously it thought that meant no
5 ; cycle could be formed so it tried to use "sub (%eax), [[RHS]]".
7 define void @gst_atomic_queue_push(i32* %addr) {
8 ; CHECK-LABEL: gst_atomic_queue_push:
9 ; CHECK: movl (%eax), [[LHS:%e[a-z]+]]
11 ; CHECK: movl (%eax), [[RHS:%e[a-z]+]]
12 ; CHECK: cmpl [[LHS]], [[RHS]]
18 %0 = load volatile i32, i32* %addr, align 4
20 %1 = load volatile i32, i32* %addr, align 4
21 %cmp = icmp sgt i32 %1, %0
22 br i1 %cmp, label %while.body, label %if.then