Nadav Rotem | a6b91ac | 2012-11-02 21:48:17 +0000 | [diff] [blame^] | 1 | ; RUN: opt < %s -cost-model -analyze | FileCheck %s |
| 2 | |
| 3 | ; The cost model does not have any target information so it can't make a decision. |
| 4 | ; Notice that OPT does not read the triple information from the module itself, only through the command line. |
| 5 | |
| 6 | ; This info ignored: |
| 7 | target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128" |
| 8 | target triple = "x86_64-apple-macosx10.8.0" |
| 9 | |
| 10 | ;CHECK: Unknown cost {{.*}} add |
| 11 | ;CHECK: Unknown cost {{.*}} ret |
| 12 | define i32 @no_info(i32 %arg) { |
| 13 | %e = add i32 %arg, %arg |
| 14 | ret i32 %e |
| 15 | } |