forked from llvm-mirror/llvm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We were incorrectly sign extending into the high word (as you would for SMULO) when legalizing UMULO in terms of a wider full multiplication. Patch by James Duley. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305800 91177308-0d34-0410-b5e6-96231b3b80d8
- Loading branch information
1 parent
46f62d5
commit f37b0db
Showing
2 changed files
with
34 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
; RUN: llc < %s -mtriple=thumbv6m-none-eabi | FileCheck %s | ||
|
||
define i1 @unsigned_multiplication_did_overflow(i32, i32) { | ||
; CHECK-LABEL: unsigned_multiplication_did_overflow: | ||
entry-block: | ||
%2 = tail call { i32, i1 } @llvm.umul.with.overflow.i32(i32 %0, i32 %1) | ||
%3 = extractvalue { i32, i1 } %2, 1 | ||
ret i1 %3 | ||
|
||
; CHECK: mov{{s?}} r2, r1 | ||
; CHECK: mov{{s?}} r1, #0 | ||
; CHECK: mov{{s?}} r3, {{#0|r1}} | ||
; CHECK: bl __aeabi_lmul | ||
} | ||
|
||
declare { i32, i1 } @llvm.umul.with.overflow.i32(i32, i32) |