Test updates were performed using: https://gist.github.com/nikic/98357b71fd67756b0f064c9517b62a34 These are only the test updates where the test passed without further modification (which is almost all of them, as the backend is largely pointer-type agnostic).
22 lines
628 B
LLVM
22 lines
628 B
LLVM
; RUN: llc < %s -mtriple=i686-- | FileCheck %s
|
|
; RUN: llc < %s -mtriple=x86_64-- -O0 | FileCheck %s -check-prefix=CHECK-X64
|
|
; RUN: llc < %s -mtriple=x86_64-- -O2 | FileCheck %s -check-prefix=CHECK-X64
|
|
|
|
; CHECK-LABEL: shift1
|
|
define void @shift1(i256 %x, i256 %a, ptr nocapture %r) nounwind readnone {
|
|
entry:
|
|
%0 = ashr i256 %x, %a
|
|
store i256 %0, ptr %r
|
|
ret void
|
|
}
|
|
|
|
; CHECK-LABEL: shift2
|
|
define i256 @shift2(i256 %c) nounwind
|
|
{
|
|
%b = shl i256 1, %c ; %c must not be a constant
|
|
; Special case when %c is 0:
|
|
; CHECK-X64: testb [[REG:%(bpl|r[0-9]+b)]], {{%(bpl|r[0-9]+b)}}
|
|
; CHECK-X64: cmoveq
|
|
ret i256 %b
|
|
}
|