llvm-6502/test/CodeGen/X86/atom-cmpb.ll
David Blaikie 7c9c6ed761 [opaque pointer type] Add textual IR support for explicit type parameter to load instruction
Essentially the same as the GEP change in r230786.

A similar migration script can be used to update test cases, though a few more
test case improvements/changes were required this time around: (r229269-r229278)

import fileinput
import sys
import re

pat = re.compile(r"((?:=|:|^)\s*load (?:atomic )?(?:volatile )?(.*?))(| addrspace\(\d+\) *)\*($| *(?:%|@|null|undef|blockaddress|getelementptr|addrspacecast|bitcast|inttoptr|\[\[[a-zA-Z]|\{\{).*$)")

for line in sys.stdin:
  sys.stdout.write(re.sub(pat, r"\1, \2\3*\4", line))

Reviewers: rafael, dexonsmith, grosser

Differential Revision: http://reviews.llvm.org/D7649

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230794 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-27 21:17:42 +00:00

37 lines
941 B
LLVM

; RUN: llc < %s -march=x86 -mcpu=atom | FileCheck %s
; CHECK: movl
; CHECK: movb
; CHECK: movb
; CHECK: cmpb
; CHECK: notb
; CHECK: notb
; Test for checking of cancel conversion to cmp32 in Atom case
; in function 'X86TargetLowering::EmitCmp'
define i8 @run_test(i8* %rd_p) {
entry:
%incdec.ptr = getelementptr inbounds i8, i8* %rd_p, i64 1
%ld1 = load i8, i8* %rd_p, align 1
%incdec.ptr1 = getelementptr inbounds i8, i8* %rd_p, i64 2
%ld2 = load i8, i8* %incdec.ptr, align 1
%x4 = xor i8 %ld1, -1
%x5 = xor i8 %ld2, -1
%cmp34 = icmp ult i8 %ld2, %ld1
br i1 %cmp34, label %if.then3, label %if.else
if.then3:
%sub7 = sub i8 %x4, %x5
br label %if.end4
if.else:
%sub8 = sub i8 %x5, %x4
br label %if.end4
if.end4:
%res = phi i8 [ %sub7, %if.then3 ], [ %sub8, %if.else ]
ret i8 %res
}