diff options
author | Chris Lattner <sabre@nondot.org> | 2011-01-02 18:31:38 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-01-02 18:31:38 +0000 |
commit | 527b47d1890275571b1a9469ac8e5a3f70c4d690 (patch) | |
tree | 7b324d4293b5ebf8abafba39c30e738f733a360f /lib/Target/X86/README.txt | |
parent | 67fb341f8b0a72ca0da8ce53baa3f335c1310a85 (diff) | |
download | llvm-527b47d1890275571b1a9469ac8e5a3f70c4d690.tar.gz llvm-527b47d1890275571b1a9469ac8e5a3f70c4d690.tar.bz2 llvm-527b47d1890275571b1a9469ac8e5a3f70c4d690.tar.xz |
update a bunch of entries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122700 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/README.txt')
-rw-r--r-- | lib/Target/X86/README.txt | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/lib/Target/X86/README.txt b/lib/Target/X86/README.txt index 4005431b75..551d9f0852 100644 --- a/lib/Target/X86/README.txt +++ b/lib/Target/X86/README.txt @@ -1507,6 +1507,8 @@ loop, the value comes into the loop as two values, and RegsForValue::getCopyFromRegs doesn't know how to put an AssertSext on the constructed BUILD_PAIR which represents the cast value. +This can be handled by making CodeGenPrepare sink the cast. + //===---------------------------------------------------------------------===// Test instructions can be eliminated by using EFLAGS values from arithmetic @@ -1847,3 +1849,38 @@ _foo: 0 is the only unsigned number < 1. //===---------------------------------------------------------------------===// + +This code: + +%0 = type { i32, i1 } + +define i32 @add32carry(i32 %sum, i32 %x) nounwind readnone ssp { +entry: + %uadd = tail call %0 @llvm.uadd.with.overflow.i32(i32 %sum, i32 %x) + %cmp = extractvalue %0 %uadd, 1 + %inc = zext i1 %cmp to i32 + %add = add i32 %x, %sum + %z.0 = add i32 %add, %inc + ret i32 %z.0 +} + +declare %0 @llvm.uadd.with.overflow.i32(i32, i32) nounwind readnone + +compiles to: + +_add32carry: ## @add32carry + addl %esi, %edi + sbbl %ecx, %ecx + movl %edi, %eax + subl %ecx, %eax + ret + +But it could be: + +_add32carry: + leal (%rsi,%rdi), %eax + cmpl %esi, %eax + adcl $0, %eax + ret + +//===---------------------------------------------------------------------===// |