[PATCH] D31077: Improve DAGTypeLegalizer::PromoteIntRes_TRUNCATE() to handle widening.

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 17 08:17:08 PDT 2017


RKSimon added a reviewer: RKSimon.
RKSimon added inline comments.


================
Comment at: test/CodeGen/SystemZ/vec-trunc-to-i1.ll:4
+; Check that a widening truncate to a vector of i1 elements can be handled.
+
+define void @autogen_SD29574(i8*, i32*, i64*, i32, i64, i8) {
----------------
Reduced with bugpoint:

```
define void @autogen_SD29574() {
BB:
  %B15 = sub <4 x i8> undef, zeroinitializer
  br label %CF34

CF34:                                             ; preds = %CF34, %BB
  %Tr24 = trunc <4 x i8> %B15 to <4 x i1>
  %Cmp26 = icmp slt <4 x i1> %Tr24, undef
  %E28 = extractelement <4 x i1> %Cmp26, i32 3
  br i1 %E28, label %CF34, label %CF36

CF36:                                             ; preds = %CF34
  ret void
}
```


https://reviews.llvm.org/D31077





More information about the llvm-commits mailing list