| ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 6 | |
| ; RUN: opt -S --passes=slp-vectorizer < %s | FileCheck %s | |
| define i2 @test(i2 %x) { | |
| ; CHECK-LABEL: define i2 @test( | |
| ; CHECK-SAME: i2 [[X:%.*]]) { | |
| ; CHECK-NEXT: [[TMP1:%.*]] = mul i2 [[X]], 0 | |
| ; CHECK-NEXT: ret i2 [[TMP1]] | |
| ; | |
| %tmp1 = add i2 %x, %x | |
| %tmp2 = add i2 %tmp1, %x | |
| %tmp3 = add i2 %tmp2, %x | |
| ret i2 %tmp3 | |
| } |