|
1 | 1 | ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
|
2 |
| -; RUN: opt < %s -passes=reassociate -S | FileCheck %s |
| 2 | +; RUN: opt < %s -passes=reassociate -S | FileCheck %s --check-prefixes=CHECK,CHECK-CV |
| 3 | +; RUN: opt < %s -passes=reassociate -S -use-constant-int-for-fixed-length-splat | FileCheck %s --check-prefixes=CHECK,CHECK-CI |
3 | 4 |
|
4 | 5 | ; Check that a*c+b*c is turned into (a+b)*c
|
5 | 6 |
|
@@ -370,10 +371,15 @@ define <2 x double> @test11_reassoc(<2 x double> %x, <2 x double> %y) {
|
370 | 371 | ; FIXME: shifts should be converted to mul to assist further reassociation.
|
371 | 372 |
|
372 | 373 | define <2 x i64> @test12(<2 x i64> %b, <2 x i64> %c) {
|
373 |
| -; CHECK-LABEL: @test12( |
374 |
| -; CHECK-NEXT: [[MUL:%.*]] = mul <2 x i64> [[C:%.*]], [[B:%.*]] |
375 |
| -; CHECK-NEXT: [[SHL:%.*]] = shl <2 x i64> [[MUL]], splat (i64 5) |
376 |
| -; CHECK-NEXT: ret <2 x i64> [[SHL]] |
| 374 | +; CHECK-CV-LABEL: @test12( |
| 375 | +; CHECK-CV-NEXT: [[MUL:%.*]] = mul <2 x i64> [[C:%.*]], [[B:%.*]] |
| 376 | +; CHECK-CV-NEXT: [[SHL:%.*]] = shl <2 x i64> [[MUL]], splat (i64 5) |
| 377 | +; CHECK-CV-NEXT: ret <2 x i64> [[SHL]] |
| 378 | +; |
| 379 | +; CHECK-CI-LABEL: @test12( |
| 380 | +; CHECK-CI-NEXT: [[MUL:%.*]] = mul <2 x i64> [[B:%.*]], splat (i64 32) |
| 381 | +; CHECK-CI-NEXT: [[SHL:%.*]] = mul <2 x i64> [[MUL]], [[C:%.*]] |
| 382 | +; CHECK-CI-NEXT: ret <2 x i64> [[SHL]] |
377 | 383 | ;
|
378 | 384 | %mul = mul <2 x i64> %c, %b
|
379 | 385 | %shl = shl <2 x i64> %mul, <i64 5, i64 5>
|
|
0 commit comments