1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 20:23:11 +01:00

[InstCombine] use FileCheck for better checking

(testing script for autogeneration of check lines)

llvm-svn: 264434
This commit is contained in:
Sanjay Patel 2016-03-25 18:02:14 +00:00
parent fe8c69e568
commit b2b5b10f67

View File

@ -1,6 +1,15 @@
; RUN: opt < %s -instcombine -S | grep ashr ; NOTE: Assertions have been autogenerated by update_test_checks.py
; RUN: opt < %s -instcombine -S | FileCheck %s
define i32 @foo(i32 %x, i32 %y) { define i32 @foo(i32 %x, i32 %y) {
; CHECK-LABEL: @foo(
; CHECK: [[A:%.*]] = and i32 %x, 7
; CHECK-NEXT: [[B:%.*]] = and i32 %y, 7
; CHECK-NEXT: [[C:%.*]] = mul nuw nsw i32 [[A]], [[B]]
; CHECK-NEXT: [[D:%.*]] = shl nuw i32 [[C]], 26
; CHECK-NEXT: [[E:%.*]] = ashr exact i32 [[D]], 26
; CHECK-NEXT: ret i32 [[E]]
;
%a = and i32 %x, 7 %a = and i32 %x, 7
%b = and i32 %y, 7 %b = and i32 %y, 7
%c = mul i32 %a, %b %c = mul i32 %a, %b