2014-02-20 05:35:39 +08:00
|
|
|
; RUN: llc < %s -march=sparcv9 | FileCheck %s
|
|
|
|
|
|
|
|
; CHECK-LABEL: test
|
|
|
|
; CHECK: srl %i1, 0, %o2
|
TableGen: fix operand counting for aliases
TableGen has a fairly dubious heuristic to decide whether an alias should be
printed: does the alias have lest operands than the real instruction. This is
bad enough (particularly with no way to override it), but it should at least be
calculated consistently for both strings.
This patch implements that logic: first get the *correct* string for the
variant, in the same way as the Matcher, without guessing; then count the
number of whitespace chars.
There are basically 4 changes this brings about after the previous
commits; all of these appear to be good, so I have changed the tests:
+ ARM64: we print "neg X, Y" instead of "sub X, xzr, Y".
+ ARM64: we skip implicit "uxtx" and "uxtw" modifiers.
+ Sparc: we print "mov A, B" instead of "or %g0, A, B".
+ Sparc: we print "fcmpX A, B" instead of "fcmpX %fcc0, A, B"
llvm-svn: 208969
2014-05-16 17:42:04 +08:00
|
|
|
; CHECK-NEXT: mov %i2, %o0
|
2014-02-20 05:35:39 +08:00
|
|
|
; CHECK-NEXT: call __ashlti3
|
TableGen: fix operand counting for aliases
TableGen has a fairly dubious heuristic to decide whether an alias should be
printed: does the alias have lest operands than the real instruction. This is
bad enough (particularly with no way to override it), but it should at least be
calculated consistently for both strings.
This patch implements that logic: first get the *correct* string for the
variant, in the same way as the Matcher, without guessing; then count the
number of whitespace chars.
There are basically 4 changes this brings about after the previous
commits; all of these appear to be good, so I have changed the tests:
+ ARM64: we print "neg X, Y" instead of "sub X, xzr, Y".
+ ARM64: we skip implicit "uxtx" and "uxtw" modifiers.
+ Sparc: we print "mov A, B" instead of "or %g0, A, B".
+ Sparc: we print "fcmpX A, B" instead of "fcmpX %fcc0, A, B"
llvm-svn: 208969
2014-05-16 17:42:04 +08:00
|
|
|
; CHECK-NEXT: mov %i3, %o1
|
|
|
|
; CHECK-NEXT: mov %o0, %i0
|
2014-02-20 05:35:39 +08:00
|
|
|
|
|
|
|
define i128 @test(i128 %a, i128 %b) {
|
|
|
|
entry:
|
|
|
|
%tmp = shl i128 %b, %a
|
|
|
|
ret i128 %tmp
|
|
|
|
}
|