aboutsummaryrefslogtreecommitdiff
path: root/llvm/test/CodeGen/X86/sub.ll
blob: 55f9ef98ca795e685b91a0a7c8744be095c6dbf1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc < %s -mtriple=i686-- | FileCheck %s

define i32 @test1(i32 %x) {
; CHECK-LABEL: test1:
; CHECK:       # %bb.0:
; CHECK-NEXT:    movl {{[0-9]+}}(%esp), %eax
; CHECK-NEXT:    xorl $-32, %eax
; CHECK-NEXT:    addl $33, %eax
; CHECK-NEXT:    retl
  %xor = xor i32 %x, 31
  %sub = sub i32 32, %xor
  ret i32 %sub
}